Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 vat added. The calculated value must be displayed on the screen. a CalcAmntDue valNum valPrice Return valNum valPrice 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 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 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 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
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 vat added. The calculated value must be displayed on the screen.
a
CalcAmntDue valNum valPrice
Return valNum valPrice
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
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
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
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started