Sunday, 23 February 2014

count the digit in a number

c programm count the digit in a number
#include<stdio.h>
int main()
{
int num ,conut=0;
printf("this code codedd by ameer hamza for more programming ckeak out my blog\n");
printf("http//letsdoprogramminginc.blodspot.com\n");
printf("Enter the number ");
scanf("%d",&num);
while(num)
{
    num=num/10;
    conut++;

}
printf("total, digtis is  %d ",conut);
    return 0;

}

No comments:

Post a Comment