Example: House

Write a program, which takes a number n (2 ≤ n ≤ 100) and prints a house with size n x n, just as in the examples:

Input Output Input Output Input Output
2 **
||
3 -*-
***
|*|
4 -**-
****
|**|
|**|
Input Output Input Output
5 --*--
-***-
*****
|***|
|***|
8 ---**---
--****--
-******-
********
|******|
|******|
|******|
|******|

results matching ""

    No results matching ""