Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //3
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL,"");
- cout << "Натуральное число : ";
- int a;
- cin >> a;
- int b = 0, c = a;
- while (c > 0)
- {
- b = (b*10) + c % 10;
- c = c / 10;
- }
- if (a == b) cout << "Число " << a << " - перевертыш";
- else cout << "Число " << a << " - не перевертыш";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement