Answer to Question #266077 in C for Sai

Question #266077

Arjun wants to count total number of digits of an integer number (N).Help him to generate the programme for the same


1
Expert's answer
2021-11-15T00:19:46-0500
#include<stdio.h>
#include<conio.h>
int main(){
int count=0,number;
printf(''Enter a number:'');
scanf(''%d'',&number);
while(number!=0){
  number=number/10;
  count ++;
}
printf('' The number of digits in a integer is: %d'',count); 
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS