@[Marisa_LV](/user/1105198) 宽和高反了
by HYdroKomide @ 2023-11-22 11:06:12
@[HYdroKomide](/user/299883) 佬,我反过来又试了一下结果全WA了,也许不是高和宽的问题?
by Marisa_LV @ 2023-11-22 12:05:29
@[Marisa_LV](/user/1105198) 哦哦,应该是大括号码风的问题
by HYdroKomide @ 2023-11-22 13:36:02
```cpp
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
char ch;
int a,b,c,d,e;
scanf("%d%d %c%d",&a,&b,&ch,&c);
if(c!=0){
for(d=1;d<=a;d++)
{
for(e=1;e<=b;e++)printf("%c",ch);
printf("\n");
}
}
else
{
for(e=1;e<=b;e++)printf("%c",ch);
printf("\n");
for(d=2;d<=a-1;d++)
{
printf("%c",ch);
for(e=2;e<=b-1;e++)printf(" ");
printf("%c",ch);
printf("\n");
}
for(e=1;e<=b;e++)printf("%c",ch);
printf("\n");
}
return 0;
}
```
这样就好了
by HYdroKomide @ 2023-11-22 13:36:48
@[HYdroKomide](/user/299883) 好的好的谢谢大佬
by Marisa_LV @ 2023-11-23 08:45:14