¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 12 de 18 · Multimedia

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.

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?