Pronic Number
Submissions: 3719   Accuracy:

28.44%

  Difficulty: Basic   Marks: 1

Pronic number is a number which is the product of two consecutive integers. The task is to check and print Pronic Numbers in a range. The first few Pronic numbers are:
0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132 and so on.

Input:
The first line consists of an integer T i.e number of test cases. The first and only line of each test case contains an integer n.

Output:
Print all the pronic numbers between 0 and n(with spaces in between).

Constraints: 
1<=T<=100
1<=n<=1000

Example:
Input:

2
6
56

Output:
0 2 6
0 2 6 12 20 30 42 56

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

Contributor: Saksham Ashtputre
Author: saksham0751


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.