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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:00, lamanihill
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
image
Computers and Technology, 23.06.2019 17:30, kenyasutton10
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
image
Computers and Technology, 24.06.2019 00:00, miguelturner
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
image
Computers and Technology, 24.06.2019 13:30, lovecats12
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
You know the right answer?
// the two senior class homerooms at littleville high school// are having a fundraising drive for th...

Questions in other subjects:

Konu
Mathematics, 05.05.2020 01:09