# Input string and count total no of consonant. (function) DECLARE FUNCTION COUNT(n$) CLS INPUT"Enter any number";n$ PRINT"total no of consonant =";COUNT(n$) END FUNCTION COUNT(n$) C=0 FOR I=1TO LEN(n$) B$=MID$(n$,I, 1) C$=UCASE$(B$) IF c$="a"AND c$="e" AND c$="i" AND c$="o" AND c$="u" THEN C=C+1 NEXT I COUNT=C END FUNCTION
Posts
- Get link
- X
- Other Apps
# Display greatest among three no. (sub) DECLARE SUB GREAT(a,b,c) CLS INPUT "Enter first number";a INPUT "Enter second number";b INPUT "Enter third number";c CALL GREAT(a,b,c) END SUB GREAT(a,b,c) IF a> b AND a >c THEN PRINT"the greatest no is ";a ELSEIF b> a AND b>c THEN PRINT" the greatest no is ";b ELSE PRINT"the greatest no is ";c END IF END FUNCTION