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...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
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...
-
Hercules Wholesalers Ltd has been particularly concerned with its liquidity position in recent months. The most recent income statement and statement of financial position of the business are as...
-
The following information is available for Elliot Company. Prepare an income statement through gross profit. January 1, 2013 2013 December 31, 2013 Raw materials inventory $26,000 $30,000 Work in...
-
The A992 steel bars are pin connected at \(B\) and \(C\). If they each have a diameter of \(30 \mathrm{~mm}\), determine the slope at \(E\). Neglect the axial load in each member. A 300 N-m B C E 3m...
-
The Welch Company is considering three independent projects, each of which requires a $5 million investment. The estimated internal rate of return (IRR) and cost of capital for these projects are...
-
Given the data below answer the question. Data table Sales $ 1,330,560 Variable Cost of Goods Sold $ 201,344 Variable Operating Expenses $ 167,200 Direct Fixed Manufacturing Overhead .... $ 112,270...
-
The marketing manager of Drexel-Hall is considering two alternative advertising strategies, each of which would cost $15,000 per month. One strategy is to advertise the name Drexel-Hall, which is...
-
During exercise when the body lacks an adequate supply of oxygen to support energy production, the pyruvate that is produced from the breakdown of glucose is converted into lactate. High lactate...
-
A reservation of rights is a. found in the Fourteenth Amendment to the U.S. Constitution. b. the act of an insured in a first-party claim. c. the act of an insurer in initially providing a defense to...
-
How are appeals often governed in workers compensation laws?
-
Damages for bad faith go beyond the ________ damages of contract law.
-
True Or False Britain was the European country where the underpinnings of workers compensation as we now know it began to take shape.
-
What types of injuries are exempt from compensation?
-
A seller has a single indivisible unit of a good that is of interest to a buyer. The seller decides on a price p to set for the good. She posts this price in her storefront, and this announcement is...
-
What is an insurable interest? Why is it important?
-
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...
-
The pressure, temperature, and velocity at a certain point in the airflow are 101,325 Pa, 46.85 C, and 1000 m/s. Calculate the total temperature and total pressure at that point.
-
Assuming that a Boeing 747 is flying at a standard altitude of 10,972 m, the pressure at a certain point on the wing is 19152 Pa. Assuming that there is an isentropic flow on the wing, calculate the...
-
The temperature and pressure at the stagnation point of the high-speed missile are 245 C and 790,335 Pa, respectively. Calculate the density at this location.
Study smarter with the SolutionInn App