参考代码:
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
int a,b,c;
char 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||i==a||j==1||j==b){
cout<<d;
}
else{
cout<<" ";
}
}cout<<endl;
}
}
if(c==1){
for(int n=1;n<=a;n++){
for(int m=1;m<=b;m++){
cout<<d;
}
cout<<endl;
}
}
return 0;
}
0.0分
1 人评分
【密码】 (C语言代码)浏览:333 |
哥德巴赫曾猜测 (C语言代码)浏览:1019 |
C语言程序设计教程(第三版)课后习题11.3 (C语言代码)浏览:1039 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:946 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:507 |
WU-蓝桥杯算法提高VIP-勾股数 (C++代码)浏览:1607 |
【蟠桃记】 (C语言代码)浏览:1035 |
核桃的数量 (C语言代码)浏览:671 |
关于float,double变量的几点说明浏览:1810 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:707 |