answersLogoWhite

0

Write a C program to find the count of digit?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

inline int getNumDigits(const int n) {

return ((int) log10(n) + 1);

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to find the count of digit?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program that would find the count of occurrence of largest digit in the input number?

#include#includevoid main(){long int n,r,m,max=0,count=0;clrscr();printf("Enter the Number:");scanf("%ld",&n);m=n;while(n>0){r=n%10;if(r>max)max=r;n=n/10;}printf("\nLargest Digit is = %ld",max);while(m>0){r=m%10;if(r==max)count++;m=m/10;}printf("\n\nOccurence of Largest Digit %ld is = %ld",max,count);getch();}output:Enter the Number:68596999Largest Digit is = 9Occurence of Largest Digit 9 is = 4


How do you find most occurring digit in a number?

Count them unless the number has a recurring ending.


How do you write Square program using vb?

write a vb program to find the magic square


Shell program to find the smallest digit of a given number?

syntax error


Write a C program to find out whether character passes through keybroad is a digit or not?

hey..it s simple..make use of built-in function isdigit(character)..it s in stdlib.h...


How do you write socket program in c?

For first find an example program.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How many times does digit zero appers from 1to10000?

If you want to find out the answer to the question you have to count or basicaly just divide by 10.....


Write a c program to find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


How are numbers measurement express in scientific notation?

from google :To write a number in scientific notation:Put the decimal after the first digit and drop the zeroes. In the number 123,000,000,000 The coefficient will be 1.23To find the exponent count the number of places from the decimal to the end of the number.In 123,000,000,000 there are 11 places. Therefore we write 123,000,000,000 as: