#880: 不知道為何會少一個空白= =


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,s=0,maxi=0;

    while(cin.getline(obj[s].a,max)){
    if(strlen(obj[s].a)>maxi)
    maxi=strlen(obj[s].a);
    s++;}
    for(int j=0;j<maxi;j++){
        for(int i=s-1;i>=0;i--){
            if(obj[i].a[j]=='\0')
            continue;
            cout<<obj[i].a[j];
        }
        cout<<endl;
    }
    system("pause");
    return 0;
}
#881: Re:不知道為何會少一個空白= =


snail (蝸牛)


長度不足的字串要補印空白,而不是跳過不印。