Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose we want to compute the average of several values entered by the user. The user repeatedly enters non - negative values, one at a

Suppose we want to compute the average of several values entered by the user. The user repeatedly enters
non-negative values, one at a time, and finally enters the value -1 to indicate that there are no more values
to enter. We then compute the average of the values entered (excluding the -1) and print it on the screen. If
the first number entered by the user is -1(i.e., the user enters no non-negative values), we print the
message "Error: no data" on the screen.
Here are a couple of sample runs:
Sample Outputs:
Please enter your values:
5
6
2
3
-1
Average of values entered is 4
Please enter your values: -1
Error: no data
Your flowchart doesn't need to use syntactically-correct C code, it just needs to be clear and unambiguous
to the reader so that they could program the algorithm in C. If you're unsure, be more precise.
image text in transcribed

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions