Arjun wants to count total number of digits of an integer number (N).Help him to generate the programme for the same
#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;
}
Comments
Leave a comment