FOR LOOP 10 (Extension 1)

Task 10: Write a program that displays all of the prime numbers between 1 and that number.
Eg User enters 20 – Display is 2, 3, 7, 11, 13,17,19 – Think carefully about how you can test to see if a number is prime. Could you two different FOR loops

Scroll to Top