Function main() of a C++ program is: int main ( ) { int marks[100], numStudents, average,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Function main() of a C++ program is: int main ( ) { int marks[100], numStudents, average, best, m; cout<<"How many students?"; cin>>numStudents; Obtain( marks, numStudents); cout<<numStudents << "students" << endl; Print (marks, numStudents); FindAverage (marks, numStudents, average); FindBest (marks, numStudents, best); cout <<endl<< "Average was: " << average << endl; cout<<"Best was: " << best << endl; return 0; a) Write a function Obtain() that gets numStudents of mark values entered at the keyboard and stores them in the array marks. [6 marks] b) Write a function Print() that prints numStudents of mark values to screen, five values to a line. [7 marks] c) Write a function findAverage() that determines the average mark. [6 marks] d) Write a function findBest() that determines the best mark. [6 marks] Function main() of a C++ program is: int main ( ) { int marks[100], numStudents, average, best, m; cout<<"How many students?"; cin>>numStudents; Obtain( marks, numStudents); cout<<numStudents << "students" << endl; Print (marks, numStudents); FindAverage (marks, numStudents, average); FindBest (marks, numStudents, best); cout <<endl<< "Average was: " << average << endl; cout<<"Best was: " << best << endl; return 0; a) Write a function Obtain() that gets numStudents of mark values entered at the keyboard and stores them in the array marks. [6 marks] b) Write a function Print() that prints numStudents of mark values to screen, five values to a line. [7 marks] c) Write a function findAverage() that determines the average mark. [6 marks] d) Write a function findBest() that determines the best mark. [6 marks]
Expert Answer:
Answer rating: 100% (QA)
Here are the C functions corresponding to the tasks a Function Obtain to get numStudents of mark values entered at the keyboard and stores them in the array marks void Obtainint marks int numStudents ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
(a) Use the following text to derive distributions for rat and chased. Use a five-word window, including open- and closed- class words, ignore case, punctuation and sentence boundaries and weight...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
There are several problems that are unique to family businesses or ventures. Which of the following is not one of those problems? Issues of succession Problems of control, fairness, and equity Issues...
-
After Chris completed the ratio analysis for S&s Air, Mark and Todd approached him about planning for next year's sales. The company had historically used little planning for investment needs. As a...
-
What are tax and loan accounts? Describe why they are set up and how changes in them affect bank reserves.
-
Amanda Forbes was hired as a nail technician by Showmann, Inc., in 2011. In 2017, Forbes attended a work-related holiday party where Showmann distributed raffle tickets to employees. One of the...
-
Activity-based costing, manufacturing. Open Doors, Inc., produces two types of doors, interior and exterior. The company's simple costing system has two direct cost categories (materials and labor)...
-
A trebuchet is a mighty siege engine capable of flinging 90-kg projectiles a distance of 300 meters. Assuming a perfect launch angle of 45, calculate the speed with which one of these projectiles...
-
A rigid L-shaped massless bracket is supported by a pin joint at A and a roller joint at B, as shown below. A force, F = 200 N is applied at a distance "a" from the left end. If a = 3.0 meters, b =...
-
Group Trafalgar Bridge Your firm has won a new bidding to build Trafalgar bridge which pass over a river. You had been asked to manage the project. The total budget is $12,000,000 l Time - Project...
-
Cheppy Chapeau sells customized made-to-order hats for special events. They have just received an order to make 400 custom hats for an upcoming event in the town. Upon reviewing the specifics, the...
-
1-Desert, Co. is trading a machine which has an original cost of $60,000 and accumulated depreciation of $35,000, for another fixed asset. For each of the following independent scenarios, determine...
-
GPB Mfg started the year with no opening DM, WIP, or Finished Goods. Below are the details for Variable Overhead: Budgeted Units to Produce = 25,000 Actual Units Produced = 20,000 Cost Driver for...
-
All else equal, will the PPE turnover ratio of a firm that only uses straight-line depreciation methods be higher, lower, or the same as the PPE turnover ratio of a firm that only uses accelerated...
-
Estimate the actual ratio (range) of [3-phosphoglycerate] and [phosphoenolpyruvate] that exists in physiological conditions in erythrocytes. In order to get full credit, you must write down the...
-
Assume a simple Keynesian depression economy with a multiplier of 4 and an initial equilibrium income of $3,000. Saving and investment equal $400, and assume full employment income is $4,000. a. What...
-
Write the C++ code for a function that receives an integer, a double number, and the address of a double variable from the calling statement. The function should multiply the integer by the double...
-
Which of the following statements declares a five-element array named population? a. int population[4] = {0}; b. int population[5] = {0}; c. int population[4] = 0 d. int population[5] = {0} Use the...
-
Complete the C++ instructions column in Figure 3-25. The numbers of latex and Mylar balloons purchased will be integers. All of the remaining items will be real numbers. Use the int and double data...
-
Do you think the trend discussed in the case will help companies hire more skilled managers and employees to staff foreign operations? Explain. According to a recent report by the Chronicle of Higher...
-
Some companies agree that the move toward internationalization by U.S. universities primarily reflect an attempt to get more money because foreign buyers are willing to pay top dollar to obtain a...
-
Form teams of five. Each team will come up with a list of five positives and five negatives for the trend discussed in the case. Each team will outline a set of implications of what this trend means...
Study smarter with the SolutionInn App