subject

// the two senior class homerooms at littleville high school// are having a fundraising drive for the prom. each time a student// solicits a contribution, a record is created with the// student's name and the value. two files have been created for// homeroom a and homeroom b. each file is sorted in contribution// value order from highest to lowest. this program merges the two files. start declarations string roomaname num roomavalue string roombname num roombvalue string bothfilesdone = "n" num high_value = inputfile roomafile inputfile roombfile inputfile mergedfile getready() while bothfilesdone = "n" detailloop() endwhile alldone()stopgetready() open roomafile "roomafile. dat" open roombfile "roombfile. dat" open mergedfile "mergedfile. dat" reada() readb() checkboth()returnreada() input roomaname, roomavalue from roomafile if eof then roomavalue = high_value endifreturnreadb() input roombname, roombvalue from roombfile if eof then roombvalue = high_value endifreturncheckboth() if roomavalue = high_value and roombvalue = high_value then bothfilesdone = "y" endifreturndetailloop() if roomavalue > roombvalue then output roombname, roombvalue to mergedfile reada() else output roomaname, roomavalue to mergedfile readb() endifreturnalldone() close roomafile close roombfile close mergefilereturn

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:40
Write c function that can replace all the positive elements to 0 and negative to 1 in undefined length one-dimensional array. test your program in the main program by defining one-dimensional array of 6 elements
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
question
Computers and Technology, 23.06.2019 04:20
4. a1. vince owns a television repair shop that is insured undera commercial package policy. the policy includes thebuilding and personal property coverage form and thecauses-of-loss broad form. the declarations page indicatesthat coverage applies to both the building and the namedinsured's business property. explain whether or not thefollowing losses would be covered under his policy.a. a fire occurs on the premises, and the building isbadly damaged.b. a burglar steals some money and securities from anunlocked safe.c. a business computer is damaged by vandals whobreak into the shop after business hours.d. a tornado touches down near the store. several tel-evision sets of customers in the shop for repair aredamaged in the storm.til
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
You know the right answer?
// the two senior class homerooms at littleville high school// are having a fundraising drive for th...
Questions