Computers and Technology, 09.10.2019 16:30 taehyungg
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
Answers: 1
Computers and Technology, 23.06.2019 00:30, Thisisdifinite
Which of the following would you find on a network
Answers: 3
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
Sarah and kelly are devoted to donating to several different causes. both want to receive the prize...
Mathematics, 18.03.2020 01:06
Arts, 18.03.2020 01:06