#5048: 請教高手 我哪裡錯了><!


cool79518 (率)


#include<iostream>
using namespace std;
int main()
{
    char a[1000];
    int j=0,x,y,t=0;
    cin.getline(a,1000);
    while(a[j]!='\0')
    {
        cout<<a[j];
        j++;
    }
    cout<<endl;
    x=0;y=j-1;
    while(x<=y)
    {
        if(a[x]==a[y])
        {
            x++;
            y--;
            t=1;
        }
        else
        {
            t=0;
            break;
        }
    }
    if(t==1)
        cout<<"yes";
    else
        cout<<"no";
       
        system("pasue");
        return 0;

}

#6512: Re:請教高手 我哪裡錯了><!


abc873693 (剛)


#include
using namespace std;
int main()
{
    char a[1000];
    int j=0,x,y,t=0;
    cin.getline(a,1000);
    while(a[j]!='\0')
    {
        cout<        j++;
    }
    cout<    x=0;y=j-1;
    while(x<=y)
    {
        if(a[x]==a[y])
        {
            x++;
            y--;
            t=1;
        }
        else
        {
            t=0;
            break;
        }
    }
    if(t==1)
        cout<<"yes";
    else
        cout<<"no";
       
        system("pasue");
        return 0;

}

   system("pasue");
  把這改掉吧!!!!