Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that asks the user to enter the length of sides for one or more squares. The user indicates the end of the

Write a program that asks the user to enter the length of sides for one or more squares. The user indicates the end of the input by entering a negative sentinel value that is not used in finding the average values. The average should be a value of type double so that it is computed with fractional part.

Input: (Your input must match the following below):

Given a list of squares, provide a list of their sides in inches. Use a negative number to indicate the end of the list. I will then tell you the average square area (in inches^2) of all the squares 3 4 -1 

Output: (Your output must match the following below): (Average data type should be double)

Average square area of all squares: 12.5in^2 

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago