Solved

What Value of COUNT Will Be Output After the Instructions

Question 11

Multiple Choice

What value of COUNT will be output after the instructions corresponding to the following pseudocode are executed,assuming 7 values - 5,6,7,3,0,4,2 - are input,one on each record?
 COUNT =0 SUM =0 VALUE =1 DOWHILE VALUE >0 Write Value  SUM = SUM + VALUE  COUNT = COUNT +1 Read VALUE  ENDDO  Write SUM, COUNT \begin{array} { l } \text { COUNT } = 0 \\\text { SUM } = 0 \\\text { VALUE } = 1 \\\text { DOWHILE VALUE } > 0 \\\text { Write Value } \\\quad \text { SUM } = \text { SUM } + \text { VALUE } \\\text { COUNT } = \text { COUNT } + 1 \\\text { Read VALUE } \\\text { ENDDO } \\\text { Write SUM, COUNT }\end{array}


A) 4
B) 5
C) 6
D) 7

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