0
How to complate this program ..need to declare and define the fuction
1 Réponse
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.