#include<cstdio> #include<cstring> int main() { int m; while(scanf("%d",&m) != EOF) { char str[100][21]; for(int i = 1; i < m + 1; i++) { scanf("%s",str[i]); int k = i; for(int j = 1; j <= i ; j++) { if(j == i || j ==4) { printf("%d=%s\n",j,str[k--]); break; } else { printf("%d=%s ",j,str[k--]); } } } } return 0; }A
文章来源: https://blog.csdn.net/LqbRoger/article/details/89714794