Composite Series
Submissions: 3416   Accuracy:

29.89%

  Difficulty: Basic   Marks: 1

Given a number N, print all the composite numbers less than or equal to N. The number should be printed in ascending order.

Input:
The first line contain an Integer T denoting the number of  test cases . Then T test cases follow. Each test case consist of an single integer N.

Output:
Print all the composite Number form 0 to N.

Constraints:

1 ≤ T ≤ 50
4 ≤ N ≤ 10000

Example:

Input:
2
10

6
Output:

4 6 8 9 10
4 6

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

Contributor: karan kumar
Author: karanshrm44


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.