#C14693. Inverted Half-Pyramid Pattern
Inverted Half-Pyramid Pattern
Inverted Half-Pyramid Pattern
Given a non-negative integer \( n \), your task is to print an inverted half-pyramid pattern using the '*' character. The top row should have \( n \) stars, the next row \( n-1 \) stars, and so on until the last row has 1 star. The construction of each row can be represented by the formula:
$$\text{row}_i = \underbrace{* \times * \times \cdots \times *}_{(n-i+1) \text{ times}}$$ for \( 1 \le i \le n \).
If \( n = 0 \), nothing should be printed.
inputFormat
The input consists of a single non-negative integer \( n \) given on one line from standard input.
outputFormat
Output the inverted half-pyramid pattern where each row is printed on a new line to standard output.
## sample5
*****
**
*
</p>