You are on page 1of 1

Programming and Computational Thinking

Homework 4
National Chi Nan University

Problem Description
Input a positive integer 𝑛, and then output all prime numbers that are less than or equal
to 𝑛 in ascending order. You should output one number per line.

Sample Input Sample Output


10 2
3
5
7

Sample Input Sample Output


5 2
3
5

Sample Input Sample Output


1

You might also like