#K51622. Star Pyramid Generator
Star Pyramid Generator
Star Pyramid Generator
In this problem, you are required to generate a star pyramid of a given height. For each test case, the program will build a pyramid where the number of stars in the i-th row (0-indexed) is given by the formula $$2i+1$$ and the row is preceded by the necessary spaces to align the pyramid centrally. The output should exactly match the expected star pyramid pattern with proper spaces and newlines. This problem tests your ability to manipulate strings and loops under simple format constraints.
inputFormat
The first line contains an integer T, representing the number of test cases. Each of the following T lines contains a single integer H, representing the height of the pyramid for that test case.
outputFormat
For each test case, output the star pyramid corresponding to the given height. For multiple test cases, separate the outputs of each test case with an empty line.## sample
1
2
*
***
</p>