Pattern Printing
Submissions: 2168   Accuracy:

52.38%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a number N. The task is to print series of asterisk(*) from 1 till N terms with increasing order and difference being 1.

Input:
The first line of the input is the number of testcases T. Each testcase contains only one value i.e. N.

Output:
For each testcase in new line, print series of asterisk's with one space between each iteration.

Constraints:
1 <= T <= 30
1 <= N <= 100

Example:
Input:

5
1
10
5
6
2

Output:
*
* ** *** **** ***** ****** ******* ******** ********* **********
* ** *** **** *****
* ** *** **** ***** ******
* **

Explanation:
Testcase 4:
For the given value of N. Series of asterisk(*) will be printed as such.
when N = 1, *
when N = 2, * **
when N = 3, * ** ***
when N = 4, * ** *** ****
when N = 5, * ** *** **** *****
when N = 6, * ** *** **** ***** ******

** For More Input/Output Examples Use 'Expected Output' option **

Author: atharv


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.