Reverse The Number Using Goto Statement C Program Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
	int n,c=0,r,f=1,i=1,t,rsum=0;
	clrscr();
	printf("\nEnter the number :");
	scanf("%d",&n);
	t=n;
	s:
	n=n/10;
	c++;
	if(n!=0)
	{
		goto s;
	}
	f:
	f=f*10;
	i++;
	if(i<c)
	{
	      goto f;
	}
	n=t;
	e:
	r=n%10;
	n=n/10;
	rsum=rsum+(r*f);
	f=f/10;
	if(n!=0)
	{
		goto e;
	}
	printf("\nReverse value : %d",rsum);
	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