Ex. 5.1 — Array

You cannot submit for this problem because the homework's deadline is due.

Description

Write a program taking an integer n as input and displaying all the primes less then n. All the primes should be stored in an array.

Format

Files

GNUMake

If you choose GNUMake, then you should compress assignment.h, ex1.c, ex2.c, ex3.c, ex4.c, main.c, Makefile directly into a zip and submit this zip. (A sample Makefile can be found on Canvas).

If you just finished ex1 and you immediately want to test whether your ex1 is working correctly. You need to modify your main.c, assignment.h, Makefile (delete ex2.c ex3.c ex4.c) and then compress main.c,assignment.h,Makefile,ex1.c into a zip and submit this zip.

The sample Makefile on Canvas has -o main, do not change this main!

CMake

If you choose CMake, then you should compress assignment.h, ex1.c, ex2.c, ex3.c, ex4.c, main.c, CMakeLists.txt directly into a zip and submit this zip. (A sample CMakeLists.txt can be found on Canvas).

If you just finished ex1 and you immediately want to test whether your ex1 is working correctly. You need to modify your main.c, assignment.h, CMakeLists.txt (delete ex2.c ex3.c ex4.c) and then compress main.c,assignment.h,CMakeLists.txt,ex1.c into a zip and submit this zip.

The sample CMakeLists.txt on Canvas has add_executable(main ..., do not change this main! Also, do not change cmake_minimum_required(VERSION 2.7)

Input

one line with one integer \(n\)

Output

a space separated list of primes on one line (each number followed by a space)

Sample 1

Input

6

Output

2 3 5 

Limitation

1s, 32MiB for each test case.

Homework 5 (Group)

Not Claimed
Status
Finished
Problems
4
Open Since
2019-10-29 00:00
DDL
2019-11-01 23:59
Extension
24.0 hour(s)