45.
Write a sub program to
find whether the given number is perfect square number or not.
DECLARE SUB PERFECT (N)
CLS
INPUT "ENTER ANY
NUMBER"; N
CALL PERFECT (N)
END
SUB PERFECT (N)
S = SQR(N)
IF S = INT(S) THEN
PRINT "PERFECT
SQUARE"
ELSE
PRINT "NOT PERFECT
SQUARE"
END IF
END SUB
No comments:
Post a Comment