Prime Counter
Challenge on lesson: Checkpoint: Loops
CHALLENGE
Difficulty: beginner+25 XP
Implement int count_primes(int limit) counting primes in [2, limit] (inclusive) using loops only. Also implement void program(void) printing exactly:
``
primes under 10: 4
2 3 5 7
``
Line 2 lists the primes 2..7 space-separated (single spaces, no trailing space).
Press Submit to check your solution.
Back to lesson: Checkpoint: Loops