Question: Please help me debug this pseudocode and also code this program in visual basic code. // main module Module main() Local variables Declare InputFile salesFile

Please help me debug this pseudocode and also code this program in visual basic code.Please help me debug this pseudocode and also code this program invisual basic code. // main module Module main() Local variables Declare InputFilesalesFile Declare Integer count = 0, readNumber, lastNumber Declare Real readAmount, personTotal-0,

// main module Module main() Local variables Declare InputFile salesFile Declare Integer count = 0, readNumber, lastNumber Declare Real readAmount, personTotal-0, allTotal- 0 // open file Open salesFile "brewster.dat" // print headings Display "Brewster' s Used Cars, Inc." Display "sales Report Display Display "Salesperson ID Display "" Sale Amount" // read and display all sales in the file While NOT eof (salesFile) Read salesFile readNumber readAmount Set count count1l //initialize If count 1 Then Set lastNurTLber = readNumber End If / check if sales ID changed If readNumber != lastNumber Then Display "Total sales for this salesperson ", personTotal Display Set personTotal = 0 Set lastNumber -readNumber End If // accumulate totals set personTotal = personTotal + readAmount set allTota1 = a11Total + readAmount End While // closing totals Display Total sales for this salesperson: personTotal Display "Total of all sales: ", allTotal // close the file Close numbersFile End Module

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!