标签:ret class set size using ring after tput eof
3 2
+---+ | | | | +---+
#include<iostream> #include<cstring> using namespace std; int main() { int n,m; while(cin>>n>>m) { char str[85][85]; memset(str,0,sizeof(str)); int i,j; for(i=0;i<=m+1;i++) { for(j=0;j<=n+1;j++) { if(i==0 || i==m+1) str[i][j]=‘-‘; else str[i][j]=‘ ‘; if(j==0 || j==n+1) str[i][j]=‘|‘; } } str[0][0]=str[0][n+1]=str[m+1][0]=str[m+1][n+1]=‘+‘; for(i=0;i<=m+1;i++) { for(j=0;j<=n+1;j++) cout<<str[i][j]; cout<<endl; } cout<<endl; } return 0; }
标签:ret class set size using ring after tput eof
原文地址:http://www.cnblogs.com/jzssuanfa/p/6789433.html