#K38192. Asterisk Pattern Generation
Asterisk Pattern Generation
Asterisk Pattern Generation
Given an integer \(n\), generate a symmetrical pattern of asterisks. The pattern consists of an increasing left-aligned triangle followed by a decreasing triangle. In other words, the first \(n\) lines contain \(i\) asterisks in the \(i^{th}\) line (for \(1 \le i \le n\)), and the next \(n-1\) lines contain \(i\) asterisks in descending order (for \(i = n-1, n-2, \dots, 1\)).
For example, if \(n=3\), the output should be:
* ** *** ** *
And if \(n=5\), the output should be:
* ** *** **** ***** **** *** ** *
You need to read the input from stdin and print the output to stdout.
inputFormat
The input consists of a single integer \(n\) (\(1 \leq n \leq 100\)) provided via standard input.
outputFormat
Output the asterisk pattern. Each line of the pattern should be printed on a new line.
## sample1
*
</p>