DECLARE SUB SUM( N)
CLS
INPUT " ENTER ANY DIGIT"; N
CALL SUM ( N)
END
SUB SUM (N)
S = 0
WHILE N<> 0
R = N MOD 10
S = S + R
N = N \10
WEND
PRINT " SUM OF DIGIT ="; S
END SUB
Subscribe to:
Post Comments (Atom)
My Journey with JM
MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...

-
My experience on visit to sericulture development centre We all the students of grade 10 of Jagat Mandir school were taken to educati...
-
MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...
-
DECLARE SUB CHECK(N) CLS INPUT " ENTER THE NUMBER";N CALL CHECK(N) END SUB CHECK(N) IF N > 0 THEN PRINT "THE GIVEN...
No comments:
Post a Comment