Given , and , you will produce a pattern consisting of asterisks () and dots (). The pattern is composed of diamonds repeated on a grid both horizontally and vertically.
You will print lines of strings. Each line will consist of characters (either asterisk or dot).
will determine the number of asterisks in the diamond.
When ,
*
When ,
.*.
***
.*.
When ,
..*..
.***.
*****
.***.
..*..
When ,
...*...
..***..
.*****.
*******
.*****.
..***..
...*...
And, so on.
You will be given three integers, , , and ().
You will print the patterns as described in the problem statement.
Input | Output |
---|---|
5 7 2 | .*..*.. ******* .*..*.. .*..*.. ******* |
Input | Output |
---|---|
7 7 3 | ..*.... .***..* ******* .***..* ..*.... ..*.... .***..* |