#31 TO CHECK WHETHER THE GIVEN NO IS PERFECT SQUARE OR NOT
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
No comments:
Post a Comment