You are on page 1of 1

#include <iostream> using namespace std; int main() { int n,z,max,x,t,inv=0,c; x=1; z=1; max=1; while(x!

=0) { { if(max<z) if(x>z) max=x; else max=z; } z=x; cin>>x; } cout<<max<<endl; t=max; while(t!=0) {c=t%10; inv=inv*10+c; t=t/10; } if(max==inv) cout<<"Numarul este palindrom"; else cout<<"Numarul nu este palindrom"; return 0; }

http://informaticasite.ro/probleme-rezolvate-c++/algoritmi-elementari/palindrom. html https://sites.google.com/site/informaticaixmieg/algoritmi-de-baza/cifra-control

You might also like