Pattern Printing
Submissions: 2355   Accuracy:

52.8%

  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


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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

to report an issue on this page.