Reverse Number Using Recursive Number in C Program Tamil


//www.tutorjoes.com
#include<stdio.h>
#include<conio.h>
int rev(int ,int);
void main()
{
	int n,f=1,t;
	clrscr();
	printf("\nEnter the number :");
	scanf("%d",&n);
	t=n;
	while(n!=0)
	{
		n=n/10;
		f=f*10;
	}
	f=f/10;
	n=t;
	printf("\nReverse number : %d",rev(n,f));
	getch();

}
int rev(int n,int f)
{
    if(n!=0)
    {
      return ((n%10)*f+(rev(n/10,f/10)));
    }
    else
    {
	return 0;
    }
}

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