Qbasic Program to check input character is capital or small. (using Function procedure)
DECLARE FUNCTION CHECK$(A$)
CLS
INPUT "ENTER ANY CHARACTER"; A$
PRINT "THE ENTERED CHARACTER IS "; CHECK$(A$)
END
FUNCTION CHECK$ (A$)
C = ASC(A$)
IF C >= 65 AND C <= 91 THEN
CHECK$ = "UPPERCASE"
ELSEIF C >= 97 AND C <= 122 THEN
CHECK$ = "LOWERCASE"
END IF
END FUNCTION
Nice
ReplyDelete