Computer Science, asked by shiva735, 10 months ago

• WAP to the count the no of
digits in a no.​

Answers

Answered by rupali1940
0

In this example, you will learn to count the number of digits in an integer entered by the user. To understand this example, you should have the knowledge of the following C programming topics: ... This program takes an integer from the user and calculates the number of digits.

Answered by anindyaadhikari13
35

Here is your answer.

<hr/>

class x

{

static void main(int number)

{

int c=0;

while(number! =0)

{

++c;

number/=10;

}

System.out.println("Total number of digits: "+c);

}

}

<hr/>

Similar questions