Solved

Given the Following Pseudocode:
Start
FINAL-ACCUM =0= 0 NAME-ACCUM =0= 0 Read NAME, AMT
SAVE-NAME

Question 5

Multiple Choice

Given the following pseudocode:
Start
FINAL-ACCUM =0= 0
NAME-ACCUM =0= 0
Read NAME, AMT
SAVE-NAME == NAME
DOWHILE not EOF
IF NAME \neq SAVE-NAME THEN
Write NAME-ACCUM
FINAL-ACCUM = FINAL-ACCUM + NAME-ACCUM
NAME-ACCUM =0= 0
SAVE-NAME == NAME
ELSE
Write NAME, AMT
NAME-ACCUM =NAMEACCUM+AMT= \mathrm { NAME } - \mathrm { ACCUM } + \mathrm { AMT }
ENDIF
Read NAME, AMT
ENDDO
Write FINAL-ACCUM
Stop
How many lines will be output if the following records are input?
John     20.00
John     30.00
Mary     10.00
Mary     6.00
Sue       8.00
Sue      5.00


A) 7
B) 9
C) 10
D) 11

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents