Posts

Showing posts from February, 2016

PROJECT WORK

Image
Programming Concept QBASIC with Output: 1) WAP to enter any string and reverse it. CLS PRINT "DOLKAR" 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) WAP to enter any string and check whether the given string is palindrome or not. CLS PRINT "DOLKAR" INPUT "ENTER ANY STRING"; 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 STRING IS PALINDROME" ELSE PRINT "THE GIVEN STRING IS NOT PALINDROME" END IF END 3) WAP to display the shortest word among three numbers. CLS PRINT "DOLKAR" INPUT "ENTER ANY WORD"; A$ INPUT "ENTER ANY WORD"; B$ INPUT "ENTER ANY WORD"; C$ IF LEN(A$) < LEN(B$) AND LEN(A$) < LEN(C$) THEN PRINT A$; "IS SHORTEST WORD" ELSEIF LEN(B$) <