为什么错?????

ykj32 2022-12-06 14:41:49 18

#include using namespace std; int main(){ int a,b,c; string d; cin>>a>>b>>d>>c; if(c==0){ for(int i=1;i<=a;i++){ for(int j=1;j<=b;j++){ if(i==1 or i==c) { cout<<d; } else if(j==1 or j==b){ cout<<d; } else{ cout<<" "; } } cout<<endl; } for(int x=0;x<a;x++){ cout<<d; } } else if(c==1){ for(int i=1;i<=a;i++){ for(int j=1;j<=b;j++){ cout<<d; } cout<<endl; } } return 0; }

{{ vote && vote.total.up }}

共 1 条回复

ykj02 懒虫

输出第一行时没有换行