How many lines will be output if the following records are input?

Given the following pseudocode:

```
Start
FINAL-ACCUM = 0
NAME-ACCUM = 0
Read NAME, AMT
SAVE-NAME = NAME
DOWHILE not EOF
IF NAME ? SAVE-NAME THEN
Write NAME-ACCUM
FINAL-ACCUM = FINAL-ACCUM + NAME-ACCUM
NAME-ACCUM = 0
(ELSE)
ENDIF
Write NAME, AMT
NAME-ACCUM = NAME-ACCUM + AMT
Read NAME, AMT
ENDDO
Write FINAL-ACCUM
Stop

```
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

d) 11

Computer Science & Information Technology

You might also like to view...

The icon of a megaphone appears on a slide when a(n) ________ is inserted

Fill in the blank(s) with correct word

Computer Science & Information Technology

The line of code that will declare an array and initialize it is:

a) int list [6] = {4, 7, 8, 2, 9, 5}; b) int list [6] {4, 7, 8, 2, 9, 5}; c) int list [6] = (4, 7, 8, 2, 9, 5); d) int list [6] (4, 7, 8, 2, 9, 5);

Computer Science & Information Technology