#C5378. Diamond Pattern
Diamond Pattern
Diamond Pattern
Given a positive integer n satisfying \(1 \le n \le 10\), your task is to print a diamond shape using stars ('*'). The diamond consists of \(2n-1\) rows with the middle row containing the maximum of \(2n-1\) stars. The pattern is symmetric vertically. For example, when n = 3
, the output should be:
* *** ***** *** *
and when n = 4
the output is:
* *** ***** ******* ***** *** *
inputFormat
The input is provided via standard input (stdin) and consists of a single integer n
.
outputFormat
The output should be printed to standard output (stdout) and must display the diamond pattern corresponding to the given integer n
.
3
*
</p>