+ 1
Brain warm up
find out the digit sum using only while loop and nothing else eg the user write 16 then the output is 1+6=7, the user enters 10562 then the output come out to be 1+0+5+6+2=14
3 Antworten
+ 1
please make a code
so that it can be runned
0
number = 67387;
sum=0;
while(number>0):
sum += int(number%10);
number/=10;
print(sum)