Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: The purpose of this project is to perform tasks depending on the user input while using loops to control the program flow. Occasion: Write

image text in transcribed
Objective: The purpose of this project is to perform tasks depending on the user input while using loops to control the program flow. Occasion: Write a program that asks user's input for running average or average calculates desired average on the number stream. As for running average, the program terminates when the user input "0.0 Example: java // example of option 1 Which average would you like to compute (1) running average, or (2) average? 1 Please enter the stream of numbers: 1.1 2 3 4.3 00 10.0 3 The average is: 1.63 // please keep in mind that the program is ignoring the '3after 0.0' since 0.0% is a termination character and every numbers after it should be ignored // example of option 2 Which average would you like to compute (1) running average, or (2) average? 2 How many numbers will you be streaming? 5 Please enter the stream of numbers: 1.1 2 3 4.300 10.03 The average is: 2.08 // please note that only the first 's numbers of the inputs are accounted for and the rest were ignored

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

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions