Posts

Showing posts from January, 2016
Programming Concept QBASIC: 1.        Input any string and reverse it. CLS INPUT "Enter any word"; A$ FOR I = LEN(A$) TO 1 STEP -1 B$ = MID$(A$, I, 1) C$ = C$ + B$ NEXT I PRINT "Reversed word = "; C$ END 2.        Input any string and check whether the given string is palindrome or not. CLS INPUT "Enter  any word"; A$ FOR I = LEN(A$) TO 1 STEP -1 B$ = MID$(A$, I, 1) C$ = C$ + B$ NEXT I IF A$ = C$ THEN PRINT  "The given word is palindrome"  ELSE PRINT  "The given word is not a palindrome” END IF END 3.        Count total no. of vowels in a given string . CLS INPUT "Enter any word"; A$ FOR I = 1 TO LEN(A$) B$ = MID$(A$, I, 1) C$ = UCASE$(B$) IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN C = C + 1 NEXT I PRINT "Total number of vowels= "; C END 4.        Count tota
                  Programming Concept QBASIC:                                                    1)NEPAL                                 ::::    CLS                                   NEPA                                            A$="NEPAL"    NEP                                               FOR I =LEN(A$) TO 1 STEP-1    NE                                                 PRINT LEFT$(A$,I)    N                                                    NEXT I                                                           END      2) L                                          ::::    CLS     AL                                                A$="NEPAL"     PAL                                              FOR I = 1 TO LEN(A$)     EPAL                                            PRINT RIGHT$(A$,I)     NEPAL                                         NEXT I                                                           END  3)E