Solid Right Angled Triangle - 2
Given an integer number
N as input. Write a program to print the double triangular pattern of N lines using an asterisk(*) character as shown below.
Note: There is a space after each asterisk * character.
Input
The first line of input will contain a positive integer.
Explanation
Given
N = 4, there should be 2 triangular patterns with 4 lines each. So, the output should be
*
* *
* * *
* * * *
*
* *
* * *
* * * *
Sample Input 1
4
Sample Output 1
*
* *
* * *
* * * *
*
* *
* * *
* * * *
Sample Input 2
5
Sample Output 2
*
* *
* * *
* * * *
* * * * *
*
* *
* * *
* * * *
* * * * *
Comments
Leave a comment