answersLogoWhite

0

inline int getNumDigits(const int n) {

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

}

User Avatar

Wiki User

16y ago

What else can I help you with?

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


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...


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

syntax error


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.


Write a Shell program to find the smallest digits of a number?

You can create a Shell script to find the smallest digit of a number by iterating through its digits. Here's a simple example: #!/bin/bash read -p "Enter a number: " number smallest=9 for (( i=0; i<${#number}; i++ )); do digit=${number:$i:1} if (( digit < smallest )); then smallest=$digit fi done echo "The smallest digit is: $smallest" This script prompts the user for a number, checks each digit, and prints the smallest one.


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 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:


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