Exercise
Exercise
7. An integer is said to be prime if it is divisible only by 1 and itself. For example, 2, 3, 5 and 7
are prime, but 4, 6, 8 and 9 are not.
a) Write a method that determines whether a number is prime and prints all the prime
numbers less than 10,000.
b) How many prime numbers you have up to 10,000?