35657

Untitled

Nov 2nd, 2023
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7.  
  8.     setlocale(LC_ALL, "ru");
  9.  
  10.     int x;
  11.  
  12.     cout << "Введите число: ";
  13.     cin >> x;
  14.  
  15.     for (; x > 0; x /= 10) {
  16.         cout << x % 10;
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment