-->
当前位置:首页 > 题库

PROGRAMMING:Show game

Luz5年前 (2021-05-10)题库462
Please write a program to input the number of checkerboard squares $$n $$(n < = 20) $$, and output the chess game of $$n times n $.
####Input format
```in
n
n × Matrix of n
```
Note: there are three values in the matrix, 0 - represents the space, 1 and - 1 represent the chess pieces of both sides respectively
####Output format
```out
Chess game
```
Note: see output example.
-0 represents a space and outputs 2 Western spaces;
-1 refers to Party A's chess pieces, and output the symbol "×";
-- 1 stands for Party B's chess piece, and the output symbol is "0".
####Input sample
> 3
> -1 0 -1
> 0 -1 1
> 1 1 0
####Output sample
> ![ Chessboard. JPG] (~ / a4be6163-b793-4568-a6df-7a975d832be9. JPG)
Tip: the outer frame is a thick line, and the inner is a thin line. The blank space in the chessboard is the Western space. For your convenience, these Chinese tabs are provided below. Please copy them to the editing software for viewing.
> ─━│┃┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋
---
If you are using the windows 10 operating system, you need to set the running window: right click the window title bar, select "properties", first switch to the "options" tab, select "use the old console", then switch to the "font" card, select "dot matrix font", recommend 8 × 16 "size". Fixedsys is recommended for the font of DEV-C + + programming window, and visual studio is recommended for the color scheme.







answer:If there is no answer, please comment