subject

Sarah and kelly are devoted to donating to several different causes. both want to receive the prize for the "number 1 donor of the department" they work in. the rules for the prize specify that the winner will be the donor with the maximum average donation, as long as some conditions are satisfied: 1. the winner must have donated to at least 5 different causes; 2. the total amount donated is at least 300 dollars. if the average is the same, the winner is the one with most donations. sarah and kelly want to compare their donations to determine who among them would win the prize (if any). they each take note of their total donation to each cause (as non-negative integer value) and signify the end of the list with a negative value. • for the donations below, sarah wins sarah: 100 200 50 100 100 51 -10 kelly: 100 100 100 100 100 100 100 100 -40 • for the donations below, kelly wins sarah: 500 700 -100 kelly: 50 100 50 50 50 -100 • for the donations below, no one qualifies for the prize sarah: 10 200 50 10 10 5 -10 kelly: 1000 -40 • for the donations below, they tie sarah: 100 200 50 100 100 50 -10 kelly: 10 130 50 140 80 190 -40 your task in this problem is to write a function void bestdonor(int* kellydonations, int* sarahdonations) that takes as input their donations and prints the outcome: either sarah or kelly wins, they tie, or they do not qualify for the prize

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
image
Computers and Technology, 23.06.2019 08:30, sofigaviria05
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
image
Computers and Technology, 23.06.2019 20:00, shadow6728g
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
image
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
You know the right answer?
Sarah and kelly are devoted to donating to several different causes. both want to receive the prize...

Questions in other subjects:

Konu
Biology, 02.04.2020 02:36