cp code palindrome give me code
#include
#include
#include
#include
using namespace std;
int main() {
int choose,n, num, digit, rev=0;
string b,palindrome;
char decision;
ks:
{
cout<<"[1]-----string palindrome"<>choose)||choose<1||choose>2){
cin.clear();
cin.ignore(numeric_limits::max(), '\n');
cout<<"only use 1-2=";
}
switch(choose){
case 1: cout<<"u choose string palindrome"<>palindrome;
b=palindrome;
reverse(b.begin(),b.end());
if(palindrome==b){
cout<<"string "<>num)|| num<=0 || num>2){
cin.clear();
cin.ignore(numeric_limits::max(),'\n');
cout<<"Error! Please enter between 1 and 2: ";
}
cout<>num)|| num<=0 || num>2){
cin.clear();
cin.ignore(numeric_limits::max(),'\n');
cout<<"Error! Please enter between 1 and 2: ";
}
cout<>num)){
cin.clear();
cin.ignore(numeric_limits::max(),'\n');
cout<<"Error! Please enter number Only: ";
}
n=num;
while(num!=0){
digit=num%10;
rev=(rev*10)+digit;
num=num/10;
}
cout<>decision)||decision!='y'&&decision!='n'){
cin.clear();
cin.ignore(numeric_limits::max(), '\n');
cout<<"only use y/n=";
}
switch(decision){
case 'y': goto ks; break;
case 'n': cout<<"session ended"; return 0;
}
}
return 0;
}