REVERSE A NUMBER USING RECURSION


LIST OF PROGRAMS


#include<stdio.h>
#include<conio.h>
void main()
{
void t(int n2);
int n;
clrscr();
printf("ENTER A NUMBERS\n");
scanf("%d",&n);
printf("REVERSE NUMBER IS :\n");
t(n);
getch();
}
void  t(int n2)
{
if(n2<=0)
printf("\nTHANK YOU");
else
{ printf("%d",n2%10);
 t(n2/10);
}
}

LIST OF PROGRAMS

Comments