Wednesday, October 2, 2019

Qbasic Program to Check input character is capital or small. (using Function procedure)


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


1 comment: