Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Week 3 To get the average of a series of values, you add the values up then divide the sum by the number of values.
Week 3
To get the average of a series of values, you add the values up then divide the sum by the number of values. Write a program (one class with the main method) that stores the following values in five different variables: 28, 32, 37, 24, and 33. The program should first calculate the sum of these five variables and store the result in a separate variable named sum. Then, the program should divide the sum variable by 5 to get the average. Display the average on the screen.
Using Java/BlueJ
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started