0

How to complate this program ..need to declare and define the fuction

Pls help 🆘 https://code.sololearn.com/cE15BJedBdOX/?ref=app

21st Jan 2021, 9:25 PM
Izzat Idham
Izzat Idham - avatar
1 Resposta
0
In your function (yet to be declared), declare and initialise a "counter" to 0. then, use a "while" loop and pass the "num" into it. In the while loop do...num/=10 and increment the counter, then just return the counter. You've got some errors in your code..use....int digit=countDigit (num) ; You can use a ternary in your output to display digit or digits. Using conio.h not recommended.
21st Jan 2021, 10:16 PM
rodwynnejones
rodwynnejones - avatar