正在加载图片...
for(inti=1;i<=n;i+) cout <<ch; cout <<endl; for(inti=1;i<=m-2;i++) { cout <<ch; for(intj=1;j<=n-2;j++) cout<<""; } cout <<ch; cout <<endl; for(inti=1:i<=n:i++) cout <<ch: cout <<endl: } 方法二: #include<bits/stdc++.h>/C+的万能头文件 using namespace std; int main() { int m,n,flag; char ch; cin>>m>>n>>ch>>flag;for(int i = 1; i <= n; i ++) { cout <<ch; } cout <<endl; for(int i = 1; i <= m-2; i ++) { cout <<ch; for(int j = 1; j <= n - 2; j ++) { cout << " "; } cout <<ch; cout <<endl; } for(int i = 1; i <= n; i ++) { cout <<ch; } cout <<endl; } } 方法二: #include <bits/stdc++.h> //C++的万能头文件 using namespace std; int main() { int m,n,flag; char ch; cin >> m >> n >> ch >> flag;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有