8. Write the greatest prime number less

a) 10 b) 20 c) 30 d) 40

a) The greatest prime number less than 10 is 7.

b) The greatest prime number less than 20 is 19.
c) The greatest prime number less than 30 is 29.
d) The greatest prime number less than 40 is 37.

a) To find the greatest prime number less than 10, we start by listing all the prime numbers less than 10: 2, 3, 5, 7. The largest prime number in this list is 7. Therefore, the greatest prime number less than 10 is 7.

b) To find the greatest prime number less than 20, we start by listing all the prime numbers less than 20: 2, 3, 5, 7, 11, 13, 17, 19. The largest prime number in this list is 19. Therefore, the greatest prime number less than 20 is 19.

c) To find the greatest prime number less than 30, we start by listing all the prime numbers less than 30: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. The largest prime number in this list is 29. Therefore, the greatest prime number less than 30 is 29.

d) To find the greatest prime number less than 40, we start by listing all the prime numbers less than 40: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37. The largest prime number in this list is 37. Therefore, the greatest prime number less than 40 is 37.

To find the greatest prime number less than a given number, we will start with the given numbers and work our way down until we find a prime number. Let's calculate the greatest prime number less than each of the given numbers:

a) To find the greatest prime number less than 10, we start with 9 and work our way down. Checking divisibility, we see that 9 is divisible by 3. Therefore, we need to check if 7 is prime. 7 is not divisible by 2 or 3, so it is prime. Therefore, the greatest prime number less than 10 is 7.

b) To find the greatest prime number less than 20, we start with 19 and work our way down. Checking divisibility, we see that 19 is not divisible by any numbers less than 19. So the greatest prime number less than 20 is 19.

c) To find the greatest prime number less than 30, we start with 29 and work our way down. Checking divisibility, we see that 29 is not divisible by any numbers less than 29. So the greatest prime number less than 30 is 29.

d) To find the greatest prime number less than 40, we start with 39 and work our way down. Checking divisibility, we see that 39 is divisible by 3. Therefore, we need to check if 37 is prime. 37 is not divisible by any numbers less than 37. So the greatest prime number less than 40 is 37.

Therefore, the answers are:
a) The greatest prime number less than 10 is 7.
b) The greatest prime number less than 20 is 19.
c) The greatest prime number less than 30 is 29.
d) The greatest prime number less than 40 is 37.