Examlex

Solved

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

question 21

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
(ELSE)
ENDIF
Write NAME, AMT
NAME-ACCUM == NAME-ACCUM + AMT
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


Definitions:

Quasi War

An undeclared naval conflict between the United States and France from 1798 to 1800, arising from disputes over treaties and naval harassment.

Undeclared

Refers to a situation or status not officially announced or confirmed, often used in the context of wars, intentions, or academic majors.

Franchise

Franchise, in the context of politics, refers to the right to vote in public elections, an essential element of democratic governance and citizen participation.

Manhood

Manhood refers to the state or condition of being a man, often associated with attributes such as strength, maturity, and responsibility, as defined by societal standards.

Related Questions