Printing the Base of the Fort

In order to draw the second to last row, which is a part of the base, we need to print a beginning |, middle (white space)_(white space) and an end |. In order to do this we can use the already declared variables colSize and midSize again, because we can see from the exmaples that they are equal to the _ in the roof.

We add + 1 to the white spaces , because we have one white space more in the examples.

The structure of the base of the fort is the same as the one of the roof. It is made up of two towers and a middle part. Each tower begins with \, then a middle _ and an end /.

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/513#0.

results matching ""

    No results matching ""