Embed
Email

Reverse Number

Document Sample

Shared by: Sumit Trivedi
Categories
Tags
Stats
views:
5
posted:
1/8/2012
language:
pages:
1
// Program to reverse the number entered by

user

#include

#include

void main()

{

int n,rn=0,mod,ren;

clrscr();

printf(" Enter number to find its reciprocal --> ");

scanf("%d",&n);

ren=n;

printf(" The reverse of %d is --> ",ren);

do

{

mod=n%10;

rn=(rn*10)+mod;

n=n/10;



}

while(n>0);

printf("%d",rn);

getch();

}



Related docs
Other docs by Sumit Trivedi
Reading _ Writing array
Views: 6  |  Downloads: 0
project report format
Views: 5  |  Downloads: 0
Matrix Multiplication
Views: 2  |  Downloads: 0
Transpose Matrix
Views: 9  |  Downloads: 0
c programmes
Views: 6  |  Downloads: 0
c programmes
Views: 6  |  Downloads: 0
bank questions
Views: 10  |  Downloads: 0
sports facts
Views: 5  |  Downloads: 0
c programmes
Views: 5  |  Downloads: 0
CLOUD COMPUTING,QUANTAM COMPUTING
Views: 15  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!