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, 22.06.2019 04:30
How can you know if the person or organization providing the information has the credentials and knowledge to speak on this topic? one clue is the type of web site it is--the domain name ".org" tells you that this site is run by a nonprofit organization.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
What are the benefits to using presentations to organize and deliver information in the workplace? they add visual appeal. they are easy to update. they ensure accuracy. they can be created quickly. the work can't be lost.
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
If she presses the left arrow , what will happened
Answers: 1
You know the right answer?
// the two senior class homerooms at littleville high school// are having a fundraising drive for th...
Questions
question
Chemistry, 28.09.2019 06:10
Questions on the website: 13722363