Armstrong no



DECLARE SUB A(N)
CLS
INPUT"ENTER ANY NO";N
CALL A(N)
END
SUB A(N)
S=0
A=N
WHILE N<>0
R=N MOD 10
S=S+R^3
N=N\10
WEND
IF A=S THEN
PRINT"THE GIVEN NNO IS ARMSTRONG";
ELSE
PRINT"THE GIVEN NO IS NOT ARMSTRONG"
END IF
END SUB

Comments

Popular posts from this blog

experience of SEE exam cancelled and covid-19

My journey in jagat mandir