Joy of Programming
Friday, 20 December 2013
Reversing a Two Number
Write a Program to Reverse a Two Digit Number??
Test Case:
INPUT
: 56
OUTPUT
: 65
# include <iostream.h.
# include <conio.h>
int main()
{
int No, q, r,
cin>>No;
q=No/10;
r=No%10;
r=r*10;
cout<<r<<q;
return 00;
}
OUTPUT:
45
54
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment