QBASIC PROGRAM TO FIND WHETHER A NUMBER IS PERFECT SQUARE OR NOT
CLS
INPUT ENTER ANY NUMBER; N
S = SQR(N)
IF S = INT(S) THEN
PRINT "PERFECT SQUARE"
ELSE
PRINT "NOT PERFECT SQUARE"
END IF
END
USING SUB
DECLARE SUB PS(N)
CLS
INPUT ENTER ANY NUMBER; N
CALL PS(N)
END
SUB PS(N)
S = SQR(N)
IF S = INT(S) THEN
PRINT "PERFECT SQUARE"
ELSE
PRINT "NOT PERFECT SQUARE"
END IF
END SUB
0 Comments