Advertisement
TheDuliX_

Untitled

Sep 11th, 2021
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. string rec;
  8. cout << "Unesite rec ";
  9. cin >> rec;
  10. reverse(rec.begin(), rec.end());
  11.  
  12. if (rec == rec)
  13. {
  14. cout << "Jeste palindrom";
  15. } else {
  16. cout << "Nije palindrom";
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement