11) The following pseudocode is executed using the "Shopping bills" dataset. What will the values of 3 points
A, B and C represent at the end of the execution?
A = 0, B = 0, C = 0
while (Pile 1 has more cards) {
Read the top card X from Pile 1
A, B, C = DoSomething(X, A, B, C)
Move X to Pile 2
}
Procedure DoSomething(Y, A, B, C) {
if (Y.ShopName "SV Stores" and Y.TotalBillAmount > A) {
A = Y.TotalBillAmount
3
if (Y.Shop Name "Big Bazaar" and Y. TotalBillAmount > B) {
B = Y.TotalBillAmount
}
if (Y.Shop Name "Sun General" and Y. TotalBillAmount > C){
C= Y.TotalBillAmount
}
return (A, B, CD)
End DoSomething
Answers
Answered by
0
Answer:
the output is going to be an error because here you didn't returned anything
Explanation:
so compiler will throw an error
Similar questions