Advertisement
destr0y

Untitled

Dec 22nd, 2019
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. int v(int);
  3.  
  4. int main()
  5. {
  6.     setlocale(LC_ALL, "Russian");
  7.     int a;
  8.     printf_s("Введите число ");
  9.     scanf_s("%d", &a);
  10.     printf_s("%d", v(a));
  11.     return 0;
  12. }
  13.  
  14. int v(int b)
  15. {
  16.     int x;
  17.     if (b > 9 && b < 100)
  18.         x = 10 * (b % 10) + b / 10;
  19.     return x;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement