23 by clamitze

VIEWS: 17 PAGES: 1

									#include<iostream.h> #include<string.h> #include<conio.h> void main() {clrscr(); char cuvant[100]; int lungime,palindrom=1; cout<<"scrie cuvantul "<<endl; cin>>cuvant; lungime=strlen(cuvant); int i; for(i=0;i<=lungime/2;i++){ if(cuvant[i]!=cuvant[lungime-i-1])palindrom=0;} cout<<endl; if(palindrom) cout<<"Este palindrom"; else cout<<"Nu este palindrom"; getch(); }


								
To top