Question: Write a program that will allow user to enter five different scores for a student. Store the scores in a five-element array named scores. Then
Write a program that will allow user to enter five different scores for a student. Store the scores in a five-element array named scores. Then display back the content of the array.
Modified your answer for question 1. In this version, the main function passes the calories array to a program-defined void function named displayArray, whose task is to display the contents of the array.
Modified your answer for question 2. The additional function will be a value-returning function named getAverage. The function will calculate the average scores of the student and then return the result to the main function.
Create a program that uses an array to store the results from a poll of 25 people. Each person was asked to estimate the amount of time, in minutes, that he or she spends on Facebook each day. The program should allow the user to enter a specific number of minutes and then display the number of people spending more than that length of time. int pollResults[25] = {35, 120, 75, 60, 20, 25, 15, 90, 85, 35, 60, 15, 10, 25, 60, 100, 90, 10, 120, 5, 40, 70, 30, 25, 5}.
Create a program that displays the highest number stored in a four-element array. The array contains the following numbers: 13, 2, 40, and 25. Use a program-defined value-returning function to determine the highest number. C++ language
Create a program that displays the highest number stored in a four-element array. The array contains the following numbers: 13, 2, 40, and 25. Use a program-defined value-returning function to determine the highest number.
By C++ language.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
