WRITE A QBASIC PROGRAM TO CHECK PERFECT SQUARE OR NOT(FUNCTION)

QBASIC PROGRAM TO CHECK PERFECT SQUARE OR NOT


QBASIC PROGRAM TO CHECK PERFECT SQUARE OR NOT(FUNCTION)



DECLARE FUNCTION PERFECT (S)
CLS
INPUT "ENTER ANY NUMBER"; N
S = SQR(N)
PR = PERFECT (S)
IF PR = S THEN
PRINT "PERFECT SQUARE"
ELSE
PRINT "NOT PERFECT SQUARE"
END IF
END

FUNCTION PERFECT (S)
PERFECT = INT (S)
END FUNCTION