Count no of digits in integer using goto statement C Program Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
	long int n,c=0;
	clrscr();
	printf("\nEnter the NUmber :");
	scanf("%ld",&n);
	s:
	n=n/10;
	c++;
	if(n!=0)
	{
		goto s;
	}
	printf("\nNo of digits : %d",c);
	getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming