-
Total time limit:
-
1000ms
-
Memory Limit:
-
65536kB
-
Describe
-
Draw the rectangle according to the parameters.
-
Input
-
Enter a row, including four parameters: the first two parameters are integers, which in turn represent the height and width of the rectangle (no less than 3 rows or less than 10 rows, and no more than 5 columns in width of not more than 10 columns); The third parameter is a character that represents the rectangle symbol used for drawing, the fourth parameter is 1 or 0, the 0 is
-
Output
-
The output draws a graphic.
-
Sample input
-
7 7 @ 0
-
Sample output
-
@@@@@@@@ @@ @@ @@ @@ @@@@@@@@
The code is actually:
1#include <cstdio>2 intm,n,p;3 CharC;4 intMain () {5scanf"%d%d%c%d",&m,&n,&c,&p);6 for(intI=1; i<=m;i++){7 for(intj=1; j<=n;j++){8 if(p| | i==1|| j==1|| i==m| | J==n) printf ("%c", c);9 Elseprintf" ");Ten } Oneprintf"\ n"); A } - return 0; -}
This question, the fourth one is obviously not 0 or ...
Draw a rectangle