Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions