Print 1 to n without using loops
Submissions: 8769   Accuracy:

38.08%

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

Print numbers from 1 to N without the help of loops.

Input: 
The first line of the input contains T, denoting the number of testcases. First line of test case contains an integer n.

Output: 
For each test case, print numbers from 1 to N in newline.

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

Example:
Input:
1
10

Output:
1 2 3 4 5 6 7 8 9 10

 

** 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.