Learn Quick Beginner's All Purpose Symbolic Instruction Code. It is dedicated to all computer students of grade 8 to grade 10 .
Summing up digits of provided number
Rem Sum of digits of Number Example: Sum of digits of 254 is 11
CLS
INPUT "Number=";n
a=n
WHILE a<>0
r=a MOD 10
s=s+r
a=int(a/10)
WEND
PRINT "Sum of digits of ";a; " is ";s
END
what is the function of int ???
ReplyDeleteUSEFUL THANKS #PROGAMMER
ReplyDelete