Looping through digits in C | Sololearn: Learn to code for FREE!

0

Looping through digits in C

I have a problem to solve given a digits ex: 12049494938 and it requires me to loop through each of them using either a while loop or for loop in C.

11/9/2019 8:06:12 AM

MrHumble

1 Answer

New Answer

+4

One of the ways is to divide the number by 10 to the power of current digit. https://code.sololearn.com/cwakQDqmiAKc/?ref=app