Advertisement
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 stotki = n % 10;
- int desetki = (n / 10) % 10;
- int edinici = (n / 100) % 10;
- int pretvrten_broj = 100 * stotki + 10 * desetki + 1 * edinici;
- if(n > pretvrten_broj) {
- cout << n << endl;
- }
- else {
- cout << pretvrten_broj << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement