GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 12 von 18 · Medien

Selling ice-cream exercise

Kostas Diakogiannis

Selling ice-cream exercise

D2 - Ice Cream exercise

 

Suppose that you are working by an ice cream shop, that has waffles where you can put from 1 up to 5 balls.

Write a program that reads the number of ice creams balls the customer wants and stores it to a variable. Then calculates the cost accordingly. The prices are the following:

1 ball: 1$

2 balls: 1,8$

3 balls: 2,5$

4 balls: 3$

5 balls: 3,30$

If no balls is specified by the customer the default should be the price for 2 balls.

Print the correct price to the console at the end.

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck