int main()
{
//freopen("beboo.txt","r",stdin);
string S;
string L="AEHIJLMOSTUVWXYZ12358";
bool mir=false;
bool pal=false;
bool first =false;
int count=0; int count2=0;
int check=0;
while(cin>>S)
{
check=0;
pal=false;
mir=false;
int y=S.length();
int x=((y)/2);
int a=y-1; int b=0;
//cout<<S[0]<<" "<<S[S.length()-1]<<endl;
}
if(y==1)
{
a=0;
if(S[a]=='B'||S[a]=='C'||S[a]=='D'
||S[a]=='F'||S[a]=='G'||S[a]=='K'
||S[a]=='P'||S[a]=='Q'||S[a]=='R'
||S[a]=='4'||S[a]=='0'
||S[a]=='6'||S[a]=='7'||S[a]=='9'||S[a]=='E'||S[a]=='3'
||S[a]=='S'||S[a]=='2'
||S[a]=='Z'||S[a]=='5')
{mir=false;}
}
if(pal==false&&mir==false)
{cout<<S<<" -- is not a palindrome.";}
else if(pal==false&&mir==true)
{cout<<S<<" -- is a mirrored string.";}
else if(pal==true&&mir==false)
{cout<<S<<" -- is a regular palindrome.";}
else
{cout<<S<<" -- is a mirrored palindrome.";}
i need help with the code , plzzz x(
#include <iostream>
#include <stdlib.h>
#include <sstream>
#include <string>
#include <string.h>
#include<algorithm>
#include <math.h>
#include <iomanip>
#include<stdio.h>
#define min(x,y) ((x)<(y)? x:y)
using namespace std;
int main()
{
//freopen("beboo.txt","r",stdin);
string S;
string L="AEHIJLMOSTUVWXYZ12358";
bool mir=false;
bool pal=false;
bool first =false;
int count=0; int count2=0;
int check=0;
while(cin>>S)
{
check=0;
pal=false;
mir=false;
int y=S.length();
int x=((y)/2);
int a=y-1; int b=0;
//cout<<S[0]<<" "<<S[S.length()-1]<<endl;
}
if(y==1)
{
a=0;
if(S[a]=='B'||S[a]=='C'||S[a]=='D'
||S[a]=='F'||S[a]=='G'||S[a]=='K'
||S[a]=='P'||S[a]=='Q'||S[a]=='R'
||S[a]=='4'||S[a]=='0'
||S[a]=='6'||S[a]=='7'||S[a]=='9'||S[a]=='E'||S[a]=='3'
||S[a]=='S'||S[a]=='2'
||S[a]=='Z'||S[a]=='5'||S[a]=='J'||S[a]=='L')
{mir=false;}
}
if(pal==false&&mir==false)
{cout<<S<<" -- is not a palindrome.";}
else if(pal==false&&mir==true)
{cout<<S<<" -- is a mirrored string.";}
else if(pal==true&&mir==false)
{cout<<S<<" -- is a regular palindrome.";}
else
{cout<<S<<" -- is a mirrored palindrome.";}
2BBS -- is not a palindrome.
B2SB -- is not a palindrome.
BBB -- is a regular palindrome.
BBBB -- is a regular palindrome.
AAA -- is a mirrored palindrome.
AAAA -- is a mirrored palindrome.
HII -- is not a palindrome.
O -- is a mirrored palindrome.
X -- is a mirrored palindrome.
B -- is a regular palindrome.
xX -- is not a palindrome.
b -- is a regular palindrome.