Найти сумму цифр числа B — Basic(Бейсик)

1
2
3
4
5
6
INPUT b
DO
s=s+b MOD 10
b=b\10
LOOP UNTIL b=0
PRINT s

Leave a Comment