Best collection of C programs
Tuesday, January 4, 2011
SWAP NUMBERS
WAP
TO SWAP THE THREE DIGIT NUMBER
void main ()
{
int b,r,n,r1,r2;
clrscr ();
printf ("Enter the Value: ");
scanf ("%d",&n);
r=n%10;
n=n/10;
r1=n%10;
n=n/10;
r2=n%10;
n=n/10;
b=(r*100)*(r2*10)+(r2);
printf ("%d%d%d",r,r1,r2);
getch ();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment