DECLARE SUB SUM(N)
CLS
INPUT"ENTER ANY NO.";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 DIGITS IS ";S
END SUB
Subscribe to:
Post Comments (Atom)
Experience of Quarantine and SEE canceled
Our SEE was canceled due to the outbreak of Corona Virus (COVID-19). It's been 3 months since the Nepalese people have been staying home...
-
Our SEE was canceled due to the outbreak of Corona Virus (COVID-19). It's been 3 months since the Nepalese people have been staying home...
-
DECLARE FUNCTION ERA(A$) CLS INPUT"ENTER ANY STRING";A$ PRINT"STRING WITHOUT VOWELS =";ERA(A$) END FUNCTION ERA(A$) B$=U...
-
DECLARE FUNCTION CONVERT (F) CLS INPUT “ENTER TEMPERATURE IN FAHRENHEIT”; F PRINT “TEMPERATURE IN CELSIUS=”; CONVERT (F) END FU...
No comments:
Post a Comment