For this project you will read in 4 numbers from the user and perform a few calculations. You…
For this project you will read in 4 numbers from the user and perform a few calculations. You will calculate the product, the average, and the sum of the numbers read in from the user. Each calculation will be performed in their ow functions, with each function returning their respective values to main().
You should ask the user if they wish to run the program again after all output finished printing. Give the user the choice between entering a 0 or 1. If they type “1”, have the program repeat. If they enter “0” or anything other than 1t program should quit.
Print a message that says the program has terminated a the user chooses to quit.
For the product, average and sum functions:
• Each function you make will ‘return’ their calculated values.
• You will print the numbers you calculate in main(). No print functions sho be called in any method other than the main method.
• Your 3 functions will take integers, but return doubles.
• Don’t worry about checking for incorrect user input.
Make sure your three functions are called in main() specifically!
Sample Program Run (user input is underlined)
Enter number 1: 10
Enter number 2: 20
Enter number 3: 30
Enter number 4: 40
Do you want to continue? (Type 1 or 0): 1 Enter number 1: