subject

Gwrite a function printtotalmedals that takes an array for olympic sports and arrays for gold, silver, and bronze medals and prints the total number of medals by discipline. your function should take 5 parameters: an array of strings discipline an array of ints representing the number of gold medalsan array of ints representing the number of silver medalsan array of ints representing the number of bronze medalsan integer size for the size of the arraysedge cases: if the size < 1, print "invalid size. size must be at least 1."if 1 ≤size < the capacity of the arrays, then just print out the relevant output until you reach the sizeth elements. for example, if the disciplines array is {"figure skating", "breakdancing", "lightsaber dueling"} but size = 2, then only the output for figure skating and breakdancing are printed to the screen.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
Gwrite a function printtotalmedals that takes an array for olympic sports and arrays for gold, silve...
Questions
question
Computers and Technology, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10