Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a loop, the user will be presented with a random number between 1 and 100. They can choose to keep the number, discard the

In a loop, the user will be presented with a random number between 1 and 100. They can choose to keep the number, discard the number or quit so the last number is not considered. The user has two lists, the keep list and the discard list. Each list is kept in the order they were added. When the user quits the loop, each list is displayed(or indicates empty) as well as the total and average for each list. Use arrays and not ArrayList. Allocate 20 for the size of each array and do not the user overfill the array. Generate no more than 25 total numbers(meaning that the loop to generate numbers will terminate after the 25th or if the user hits quit). Output should look like this: New number: 20 Enter option: (K, D, Q) : K is to keep the number, D to discard and Q to quit the program. Once the program finishes the discard and keep lists should be displayed with all the numbers that were kept or discarded and the total kept and discarded and their averages. Thanks a lot!

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago