Thursday, October 31, 2019

Wap to check whether the given number 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

Journey with jagat mandir

        My journey with Jagat Mandir School My first day and my first step in jagat mandir was on 2067. On the first day I came with my ...