#875: 題目的終止條件是什麼搞不懂


bird (GG)


#include<iostream>
#define max 100
using namespace std;
struct stack
{
    char a[max+1];
};
typedef struct stack stk;
int main()
{
    stk obj[max];
    int j=0,maxi=0;

    for(int i=0;i<2;i++){
    cin.get(obj[i].a,max);
    if(strlen(obj[i].a)>maxi)
    maxi=strlen(obj[i].a);
    getchar();}
    for(int j=0;j<maxi;j++){
        for(int i=1;i>=0;i--){
            if(obj[i].a[j]=='\0')
            continue;
            cout<<obj[i].a[j];
        }
        cout<<endl;
    }
    system("pause");
    return 0;
}
#876: Re:題目的終止條件是什麼搞不懂


snail (蝸牛)


以 EOF 為結束,最多有 100 行喔!