Floyd's triangle
Submissions: 2332   Accuracy:

50.45%

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

Given a number N. The task is to print Floyd's triangle with N lines.

Input:
The first line of input contains an integer T, denoting the number of testcases. Then T test cases follow. Each testcase contains an integer N.

Output:
Print the Floyd's triangle with N lines.

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

Example:
Input:
2
4
5

Output:
1
2 3
4 5 6
7 8 9 10
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

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

Contributor: Ayush Govil
Author: Ayush Govil 1


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.