Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main() {
  5. int n;
  6. int r[4];
  7.  
  8. cout << "Enter Your Number:";
  9. cin >> n;
  10.  
  11. int i = 0;
  12. while (n != 0) {
  13. r[i] = n % 10;
  14. n = n / 10;
  15.  
  16. cout << r[i];
  17. i++;
  18. }
  19. cout << endl;
  20.  
  21. if (r[0] == r[2] && r[1] == r[3]) {
  22. cout << "TRUE";
  23. } else {
  24. cout << "FALSE";
  25. }
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement