PROGRAMMING:Function and sorting exercise 1
Input n numbers (n < = 10), sort the primes (excluding non primes), and output the sorted results.
Suggestion: write several functions to judge prime numbers and sort arrays.
###Input format:
The first line is a positive integer T, which represents the total number of tests.
Then there are t lines of test data, each line starts with an integer n, followed by N integers.
###Output format:
For each group of tests, output the results sorted from small to large (1 space between the numbers, no extra space at the end).
###Input example:
```in
two
5 2 4 7 9 3
6 8 6 4 2 11 7
```
###Output example:
```out
2 3 7
2 7 11
```
answer:If there is no answer, please comment
Suggestion: write several functions to judge prime numbers and sort arrays.
###Input format:
The first line is a positive integer T, which represents the total number of tests.
Then there are t lines of test data, each line starts with an integer n, followed by N integers.
###Output format:
For each group of tests, output the results sorted from small to large (1 space between the numbers, no extra space at the end).
###Input example:
```in
two
5 2 4 7 9 3
6 8 6 4 2 11 7
```
###Output example:
```out
2 3 7
2 7 11
```
answer:If there is no answer, please comment