Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.cpp
- // Test
- //
- // Created by Andrey Zozulych on 20.07.2020.
- // Copyright © 2020 Andrey Zozulych. All rights reserved.
- //
- #include <iostream>
- int main() {
- // insert code here...
- int num;
- std::cin>>num;
- int firstDigit=num/100;
- num-=firstDigit*100;
- int secondDigit=num/10;
- num-=secondDigit*10;
- num*=10;
- num+=secondDigit;
- num*=10;
- num+=firstDigit;
- std::cout<<num;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement