Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n; // brojot na borjan
- cin >> n;
- int posledna_cifra = n % 10;
- int sredna_cifra = (n / 10) % 10;
- int prva_cifra = n / 100;
- int m = (posledna_cifra * 100) + (sredna_cifra * 10) + prva_cifra; // brojot na gorjan
- if (n > m)
- {
- cout << n << endl;
- }
- else {cout << m << endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement