2301答案

Papyrus在审判你  •  1年前


#include<bits/stdc++.h>
using namespace std;
struct zang{
    string id;
    string b;
    string c;
    string d;
    string e;
    string f;
};
int main(){
    zang a[10000];
    int s=0;
    int w=0;
    while(s==0){
       string bv;
       cin>>bv;
       if(bv=="end"){
           break;
       }
       a[w].id=bv;
       cin>>a[w].b;
       cin>>a[w].c;
       cin>>a[w].d;
       cin>>a[w].e;
       cin>>a[w].f;
       w++;     
    }
    for(int i=w-1;i>=0;i--){     
        cout<<a[i].id<<" ";     
        cout<<a[i].b<<" "; 
        cout<<a[i].c<<" ";
        cout<<a[i].d<<" ";
        cout<<a[i].e<<" ";
        cout<<a[i].f<<endl;
    }
    return 0;
}

评论:

请先登录,才能进行评论