Pages

Write a program to Get Reverse number of Given Number

Saturday, 20 April 2013

#include<stdio.h>

#include <conio.h>
int main(){
    int num,r,reverse=0;

    printf("Enter any number: ");
    scanf("%d",&num);

    while(num){
         r=num%10;
         reverse=reverse*10+r;
         num=num/10;
    }

    printf("Reversed of number: %d",reverse);
    getch();
}

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *