Looping through digits in C | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 1

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.

9th Nov 2019, 8:06 AM
MrHumble
MrHumble - avatar
1 Resposta
+ 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
9th Nov 2019, 8:57 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar