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
You might also like to view...
Intermediate Stream operation ________ results in a stream in which each element of the original stream is mapped to a new value (possibly of a different type)—e.g., mapping numeric values to the squares of the numeric values. The new stream has the same number of elements as the original stream.
a. mapped b. map c. mapper d. mapping
Reimplement method doSomething() so that it doesn’t modify the array. What is the cost of this new algorithm?
What will be an ideal response?
Conversations, messages that can be viewed in groups, can be expanded or collapsed
Indicate whether the statement is true or false
When you make a change to a rule, all page elements formatted with that rule are automatically updated.
Answer the following statement true (T) or false (F)