Num mastertotal num transid num transtotal string

This preview shows page 2 - 5 out of 5 pages.

�� ��� num mastertotal �� ��� num transid �� ��� num transtotal �� ��� string transservice �� ��� string arebothatend= "n" �� ���
num end_id = 999 �� ��� getready () �� while arebothatend <> "y" �� updaterecords () �� ��� endwhile �� finishup () �� stop getready () open masterfile "curlupanddyemaster.txt" �� open transfile "curlupanddyetransaction.txt" �� open updatedfile "updatedclients.txt" �� readmaster () �� readtrans () �� checkend () �� return readmaster () input masterid, masterfirstname, masterlastname, �� mastertotal from masterfile if eof then �� master id = end_id �� endif �� return readtrans () input transid, transservice, transtotal from transfile �� if eof then �� transid = endid �� endif �� return
endend () if masterid = end_id then �� if transid = end_id then �� arebothatend = "y" �� endif �� return updaterecords () if transid = masterid then �� mastertotal = mastertotal + transtotal �� out masterid, masterfirstname, masterlastname, �� mastertotal to updatedfile readmaster () �� readtrans () �� else if trans id > masterid then out masterid, �� mastaerfirstname, masterlastname, mastertotal to updatedfile readmaster () �� else output "no master record for transaction", transid �� endif �� endif �� checkend () �� return finishup close mastefile �� close transfile �� close updatedfile ��
return ��

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture