51. WAP to count number of digits in given input number using [goto].
#include <stdio.h>
int
main()
{
int number,c=0;
printf("WAP to count number of digits in
given input number using [goto]\n");
printf("Enter the number : ");
scanf("%d",&number);
L1:
number=number/10;
c++;
if(number!=0)
goto L1;
printf("%d",c);
return 0;
}
Comments
Post a Comment