Answer to Question #278700 in Algorithms for Moon

Question #278700

Ahmed wants to gift his friend. He has 82.300 OMR. He wants the following products: Sport suite with 15.700 OMR Sport shoes with 32.00 OMR Sport water bottle with 4.50 OMR Headphone with 8.25 OMR iPod with 9.88 OMR Write an algorithm to check whether he can buy all the above items. Display the total, and the remaining amount in OMR that Ahmed will have if any.


1
Expert's answer
2021-12-12T01:18:58-0500

input:

m \\ Ahmed has amount

t = 82.3+17.5+32+4.5+8.25+9.88 \\ calculate total amount

r = m-t \\ calculate remaining amount

if r < 0 then

display "not enough money"

output:

r, t


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS