check input character is capital or small(function)
DECLARE FUNCTION CHECK$(S$)
CLS
INPUT "ENTER A CHARACTER";S$
PRINT "THE GIVEN CHARACTER IS ";CHECK$(S$)
END
FUNCTION CHECK$(S$)
A=ASC(S$)
IF A>=65 AND A<=91 THEN
CHECK$="CAPITAL"
ELSEIF A>=97 AND A<=122 THEN
CHECK$="SMALL"
END IF
END FUNCTION
CLS
INPUT "ENTER A CHARACTER";S$
PRINT "THE GIVEN CHARACTER IS ";CHECK$(S$)
END
FUNCTION CHECK$(S$)
A=ASC(S$)
IF A>=65 AND A<=91 THEN
CHECK$="CAPITAL"
ELSEIF A>=97 AND A<=122 THEN
CHECK$="SMALL"
END IF
END FUNCTION
Comments
Post a Comment