Posts

QBASIC PROGRAMMING    *WAP TO FIND SUM OF DIGIT . (SUB)  DECLARE SUB SUM (N) CLS INPUT"ENTER ANY   NUMBER  ";N CALL SUM (N) END SUB SUM (N)  S=0  WHILE N< >0  R= N MOD 10  S= S+R  N= N\10  WEND PRINT "SUM OF DIGIT ";S END SUB 
QBASIC PROGRAMMING  *WAP TO PRINT FIRST ODD NUMBER .(SUB) DECLARE SUB  SERIES ( ) CLS  CALL SERIES  END   SUB SERIES (   ) A= 1  FOR I = 1 TO 10  PRINT A = A+2  NEXT I  END SUB 
QBASIC PROGRAMMING   *WAP to display reverse of input string. (SUB) DECLARE     SUB     REVERSE (N) CLS  INPUT" Enter any number ";N  CALL REVERSE (N) END SUB REVERSE (N) S=0 WHILE N <>0 R= N MOD 10  S= S*10 +R N= N \ 10  WEND  PRINT "reversed digit ";S END SUB
QBASIC PROGRAMMING  *WAP  TO FIND AREA OF CIRCLE. (SUB)   DECLARE             SUB            CIR  (R) CLS  INPUT" Enter   radius ";R CALL CIR (R) END SUB  CIR (R) A= 22/ 7* R ^ 2  PRINT "area     of   circle" ;  A END SUB 
 Write a program that  asks marks in any subject and display the message "Result pass" if the input number is greater than 40 CLS INPUT " enter marks in computer ";c IF c>= 40 THEN PRINT "Result pass"ELSE PRINT"Result fail" END  Write a program that asks any two number and display the one CLS INPUT"enter first number":a INPUT"enter second number";b If a>b THEN PRINT "the greater number is ": a ELSE PRINT" the greater number is";b END if END Write a program that checks whether the supplied number is even or odd CLS INPUT"enter any number":n If n mod 2=0 THEN PRINT " even number" ELSE PRINT " odd number" END IF END Write a program that checks your age and tells whether you are eligible CLS INPUT"ENTER your age":a IF a>=18 THEN PRINT " you are eligible to vote" ELSE PRINT" your are not eligible to vote" E