代码:
# include<stdio.h>
# include<string.h>
int main(){
char s
[100];
scanf("%s",&s
);
int l
=strlen(s
);
int a
=(l
+2)/3;
int b
=l
-2*a
+2;
int i
,j
;
for(i
=0;i
<a
-1;i
++){
printf("%c",s
[i
]);
for(j
=0;j
<(b
-2);j
++)
printf(" ");
printf("%c\n",s
[l
-i
-1]);
}
for(i
=0;i
<b
;i
++)
printf("%c",s
[i
+a
-1]);
}
转载请注明原文地址:https://ipadbbs.8miu.com/read-52527.html