Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int N;
- cin >> N;
- int a;
- a = N%10;
- int b;
- b = (N/10)%10;
- int c;
- c = N/100;
- int M;
- M = a*100 + b*10 + c*1;
- if(M>N) {
- cout << M <<endl;
- }
- else {
- cout << N <<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment