Question: Provided the problem statement below, which of the following algorithms will solve the problem? Reginald went to a shop to buy a number of fruit

Provided the problem statement below, which of the following algorithms will solve the problem?
Reginald went to a shop to buy a number of fruit bars. The amount due must be calculated and 14% vat added. The calculated value must be displayed on the screen.
a.
CalcAmntDue (valNum, valPrice)
Return (valNum * valPrice *1.14)
ShoppingProgram
display Enter the number of fruit bars bought
enter numberItems
display Enter the price of a fruit bar
enter price
amtDue = CalcAmntDue (numItems, price)
display The amound due is R, amtDue
end
b.
Function CalcAmntDue (valNum, valPrice)
Return (valNum * valPrice *1.14)
ShoppingProgram
display Enter the number of fruit bars bought
enter numberItems
display Enter the price of a fruit bar
enter price
amtDue = CalcAmntDue (numItems, price)
display The amound due is R, amtDue
end
c.
Function CalcAmntDue ()
Return (valNum * valPrice *1.14)
ShoppingProgram
display Enter the number of fruit bars bought
enter numberItems
display Enter the price of a fruit bar
enter price
amtDue = CalcAmntDue (numItems, price)
display The amound due is R, amtDue
end
d.
Function CalcAmntDue (valNum, valPrice)
Return (valNum * valPrice *1.14)
ShoppingProgram
display Enter the number of fruit bars bought
enter numberItems
display Enter the price of a fruit bar
enter price
amtDue = CalcAmntDue (valNum, valPrice)
display The amound due is R, amtDue
end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!