Write a program that prompts the user for a prime number until the number 109 is encountered. Not including the 109, calculate the average.
a) The average of all entered prime numbers
b) The average of the first and last prime numbers entered
c) The average of the largest and smallest prime numbers entered
d) The average of all prime numbers entered excluding 109