Question: C program Write a program to calculate the number of digits in an integer entered by the user. Assume that the entered number is always
C program
Write a program to calculate the number of digits in an integer entered by the user. Assume that the entered number is always greater than 0; your program should terminate when a 0 is entered. In your program, you should use a while statement. Hint: The program will divide the user's input by 10 repeatedly until it becomes 0; The number of divisions performed is the number of digits
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
