We can see from the examples that the roof is made of two towers and a middle part. Each tower has a beginning
^ and an end
The size of the middle is
n / 2, therefore we can write this value in a new variable. It will keep the size of the middle of the tower.
Now we declare a second variable, which will keep the value of the part between the two towers. The middle of the roofs size is
2 * n - 2 * colSize - 4.
In order to print the roof, we will use
new string, which takes two parameters
(char, int) and connects a symbol n times.