
REM Program to print sum of the digits of a given number
CLS
INPUT "Enter any digit"; n
WHILE n <> 0
r = n MOD 10
s = s + r
n = n \ 10
WEND
PRINT "Sum of digits is "; s
END
...
Be Updated..
Bhim Higher Secondary School Suntopar, Dolakha
Bhim Higher Secondary School Suntopar, Dolakha
Bhim Higher Secondary School Suntopar, Dolakha
Bhim Higher Secondary School Suntopar, Dolakha
Bhim Higher Secondary School Suntopar, Dolakha