Question: CLASS 8 - ARRAY 1 - D Array ( Program ) a . Write, compile, and run a C + + program to input the

CLASS 8- ARRAY
1-D Array
(Program) a. Write, compile, and run a C++ program to input the following values into an array named prices: 10.95,16.32,12.15,8.22,15.98,26.22,13.54,6.45, and 17.59. After the data has been entered, have your program display the values.
b. Repeat Exercise 1a, but after the data has been entered, have your program display it in the following form:
\table[[10.95,16.32,12.15],[8.22,15.98,26.22],[13.54,6.45,17.59]]
(Program) Write, compile, and run a C++ program to input eight integer numbers into an array named grade. As each number is input, add the numbers to a total. After all numbers are input, display the numbers and their average.
(Program) a. Write, compile, and run a C++ program to input 10 integer numbers into an array named fmax and determine the maximum value entered. Your program should contain only one loop, and the maximum should be determined as array element values are being input. (Hint: Set the maximum equal to the first array element, which should be input before the loop used to input the remaining array values.)
b. Repeat Exercise 3a, keeping track of both the maximum element in the array and the index number for the maximum. After displaying the numbers, display these two messages replacing the underlines with the correct values):(Program) Write, compile, and run a C++ program that creates an array of five integer numbers and displays these numbers in reverse order.(Program) Define an array named peopleTypes that can store a maximum of 50 integer values entered at the keyboard. Enter a series of 1s,2s,3s, and 4 s in the array to represent people at a local school function; 1 represents an infant, 2 represents a child, 3 represents a teenager, and 4 represents an adult. No other integer value should be accepted as valid input, and data entry should stop when a negative value is entered. Your program should count the number of each 1,2,3, and 4 in the array and display a list of how many infants, children, teenagers, and adults were at the school function.
CLASS 8 - ARRAY 1 - D Array ( Program ) a .

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 Programming Questions!