Помогите с доработкой программы.
нужно из введенной строки взять часть строки ограниченную элементами, вывести ее на экран и исследовать на симметричность.
#include
#include
bool recurs(char *a,int i,int j)
{
if(i >= j)return 1;
if(a[ i] == a[ j])return recurs(a,i+1,j-1);
return 0;
}
void main()
{
char a[255];
int i,j;
cout<<"Vvedite stroku: \n";
cin.getline(a,255);
do{
cout<
cout<<"Vvedite j:"<
if (i>j)
{
cout<<"oshibka vvoda.i>j."<
if (recurs(a,i,j)==true) cout<<"Stroka simetricna.";
else cout<<"Stroka ne simetricna.";
getch();
}