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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What is the function of compilers and interpreters? how does a compiler differ from an interpreter?
Answers: 2
question
Computers and Technology, 25.06.2019 05:30
Two technicians are discussing a resistance measurement. technician a states that components being measured should be removed or isolated from the circuit. technician b states that power to the circuit should be disconnected when measuring resistance. which technician is correct?
Answers: 1
You know the right answer?
Sarah and kelly are devoted to donating to several different causes. both want to receive the prize...
Questions
question
Mathematics, 26.02.2021 22:30
question
Mathematics, 26.02.2021 22:30
question
Mathematics, 26.02.2021 22:30
question
Mathematics, 26.02.2021 22:30
question
Mathematics, 26.02.2021 22:30
Questions on the website: 13722367