Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- int main()
- {
- int broj;
- std::cout<<"Unesite neki broj:\n";
- std::cin>>broj;
- int cifre, nova=0;
- int temp=broj;
- while (broj!=0)
- {
- cifre=broj%10;
- nova=nova*10+cifre;
- broj/=10;
- }
- if (nova==temp) std::cout<<"Broj je palindroman!\n";
- else std::cout<<"Broj nije palindroman!" << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement