Accenture Primer
Accenture DumpmediumAccenture PrimerArrays

Select the appropriate code snippet for the given problem statement provided as pseudocode.

Answer options

A
Problem Statement :
B
Dinner Plan
C
Five friends plan to go out for dinner. They plan to order equal number of dishes. Each row specifies individual cost. Find the total
D
amount each person needs to pay.
E
Assume the values for this matrix for 3 dishes are
F
12 23 18
G
45 32 60
H
42 39 23
I
54 42 60
J
25 84 30
K
The output will be
L
Amount to be paid by person 1 is 53
M
Amount to be paid by person 2 is 137
N
Amount to be paid by person 3 is 104
O
Amount to be paid by person 4 is 156
P
Amount to be paid by person 3 is 139
Q
Explanation : Output is the sum of each row
R
Code:
S
BEGIN
T
DECLARE variable arr[5][20], n, sum=0
U
___________________
V
FOR j IN 0 to n-1 DO
W
READ arr[i][j]
X
END FOR
Y
END FOR
Z
FOR i IN 0 TO 4 DO
[
SET sum = 0
\
FOR j IN 0 TO n-1 DO
]
sum = sum + arr[i][j]
^
END FOR
_
PRINT "Amount to be paid by person "+(i+1)+" is "+sum
`
END FOR
a
END
b
FOR i IN 0 to n DO
c
FOR i IN 0 to 5 DO
d
FOR i IN 0 to 4 DO
e
FOR i IN 0 to 3 DO

Correct answer: ___________________, FOR i IN 0 TO 4 DO, FOR i IN 0 to 4 DO

Explanation

The source marks the correct answer as: FOR i IN 0 to 4 DO.

Related Accenture Accenture Primer questions

Practice more Accenture Accenture Primer questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.