Printing Reverse Of Given Number


 

#include<stdio.h>

#include<conio.h>

void main()

{

int num,res;

clrscr();

printf("Enter A Number :-  ");

scanf("%d",&num);

while(num>0)

{

res=num%10;

printf("%d",res);

num=num/10;

}

getch();

}



Output:-

Enter A Number :-  213

312

Comments

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array