VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
34. Count total numbers of 0 in a number :—
#include<stdio.h>
int main()
{
int count,n,r;
count=0;
printf("enter a value of n ");
scanf("%d",&n);
while(n>0)
r=n%10;
if(r==0)
count++;
}
n=n/10;
printf("%d",count);
return 0;
No comments:
Post a Comment