Write a function to find the count of all digits in a given number N. The number will be passed to the function as an input parameter of type int
Answers
Answered by
0
Answer: Step by step descriptive logic to count number of digits in given integer using loop.
Input a number from user. Store it in some variable say num.
Initialize another variable to store total digits say digit = 0.
If num > 0 then increment count by 1 i.e. count++.
Divide num by 10 to remove last digit of the given number i.e. num = num / 10.
Repeat step 3 to 4 till num > 0 or num != 0.
Explanation:
Answered by
0
Answer:
sorry I don't know
Similar questions