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
DECLARE SUB CHECK(N)
CLS
INPUT "Enter any number.";N
CALL CHECK(N)
END
SUB CHECK(N)
IF N > 0 THEN
PRINT "The number is positive"
ELSEIF N < 0 THEN
PRINT"The number is negative"
ELSE
PRINT "The number is neutral"
END IF
END SUB
DECLARE FUNCTION ERA (A$)
CLS
INPUT "Enter any string";A$
PRINT "String without vowels =";ERA(A$)
END
FUNCTION ERA(A$)
FOR I = 1 TO LEN (A$)
B$ = MID$(A$,I,1)
C$ = UCASE$(B$)
IF C$ <> "A" AND C$ <> 'E" AND C$ <> "I" AND C$ <> "O" AND C$ <> "U" THEN D$ = D$ + C$
END IF
NEXT I
ERA = D$
END FUNCTION
DECLARE FUNCTION PAL$ ( N$ )
CLS
INPUT "Enter any number"; N$
P$ = PAL$ ( N$ )
IF N$ = P$ THEN
PRINT "The given word is Palindrome'
ELSE
PRINT " The given word is not Palindrome"
END IF
END
FUNCTION PAL$ (N$)
FOR I = LEN(S$) TO 1 STEP -1
B$ = MID$( N$, I, 1)
L$ = L$ + B$
NEXT I
PAL$ = L$
END FUNCTION