Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Operators | Primeros Pasos
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Fundamentos de C#

bookChallenge: Operators

Tarea

Swipe to start coding

  • You are creating a simple store calculator. The calculator should compute the total price, discount, tax, and final price for items in a store.

  • Complete the RunStoreCalculator method by filling in the missing parts (___) to correctly calculate:

    • To calculate the total price, multiply the price of a single item by the quantity of items.

    • To calculate the discount amount, multiply the totalPrice by discountPercent and then divide by 100 to convert the percentage into a value.

    • To calculate the tax amount, first subtract the discountAmount from the totalPrice to get the price after discount, then multiply by taxPercent and divide by 100.

    • To calculate the final price, subtract the discountAmount from the totalPrice, then add the taxAmount to get the final total the customer needs to pay.

  • Print all values with clear labels inside the method.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 14
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: Operators

Desliza para mostrar el menú

Tarea

Swipe to start coding

  • You are creating a simple store calculator. The calculator should compute the total price, discount, tax, and final price for items in a store.

  • Complete the RunStoreCalculator method by filling in the missing parts (___) to correctly calculate:

    • To calculate the total price, multiply the price of a single item by the quantity of items.

    • To calculate the discount amount, multiply the totalPrice by discountPercent and then divide by 100 to convert the percentage into a value.

    • To calculate the tax amount, first subtract the discountAmount from the totalPrice to get the price after discount, then multiply by taxPercent and divide by 100.

    • To calculate the final price, subtract the discountAmount from the totalPrice, then add the taxAmount to get the final total the customer needs to pay.

  • Print all values with clear labels inside the method.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 14
single

single

some-alt