Question: C++ Please Design a program to allow a scientist to enter the number of fruit flies in each of 5 jars. After the data has

C++ Please

C++ Please Design a program to allow a scientist to enter the

Design a program to allow a scientist to enter the number of fruit flies in each of 5 jars. After the data has been entered, the program should print out the index of the jar with the largest population and the index of the jar with the smallest population. Before writing the program, create 3 test cases (with expected output). Put your test cases in comments in the program. After writing the program (lab7_fruitfly.cpp), run your test cases and check that they work correctly. You do not need to check user input for validity (you will be the user ). Example output (user input is highlighted): Hello Scientists! You have 5 jars to fill with fruit flies. How many fruit flies would you like in jar 0: 3 How many fruit flies would you like in jar 1: 2 How many fruit flies would you like in jar 2: How many fruit flies would you like in jar 3: How many fruit flies would you like in jar 4: The jar with the most fruit flies: jar 2 The jar with the least fruit flies: jar 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!