Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To get the average of series of values, you add the values up and then divide the sum by the number of values. Write a

To get the average of series of values, you add the values up and then divide the sum by the number of values. Write a program 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 to the screen. Design your output anyway you want.

Tip: Use double data type for all variables in this program. Output= 30.8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

sharing of non-material benefits such as time and affection;

Answered: 1 week ago