New update is available. Click here to update.

Inverted Triangle Of Stars

Posted: 20 Feb, 2021
Difficulty: Easy

PROBLEM STATEMENT

Try Problem

You have been given an integer ‘N’. You need to print an inverted isosceles triangle of stars such that the height of the triangle is N.

For example :
If N = 4 then the output will
*******
 *****
  ***
   *
Input Format:
The first line contains an integer 'T' which denotes the number of test cases or queries to be run. Then the test cases are as follows.

The first line of each test case contains an integer ‘N’ which denotes the height of the inverted isosceles triangle of stars to be printed.
Output Format:
For each test case, print an inverted isosceles triangle of stars such that the height of the triangle is N

Print the output of each test case in a separate line.
Constraints:
1 <= T <= 100
1 <= N <= 100

Time Limit : 1 sec