Created
October 31, 2022 03:32
-
-
Save HugoRoca/5deac377c66f4538c993b9944a02e12e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.WriteLine("\n\nExercise 4:"); | |
Console.Write("Ingrese el precio por unidad de cada producto: "); | |
double productPrice = double.Parse(Console.ReadLine()); | |
Console.Write("Ingrese la cantidad adquirida por el cliente: "); | |
int quantity = Int32.Parse(Console.ReadLine()); | |
double totalPay04 = productPrice * quantity; | |
if (quantity > 20) totalPay04 -= (totalPay04 * 0.1); | |
else if (quantity > 10) totalPay04 -= (totalPay04 * 0.05); | |
Console.WriteLine("El cliente debe pagar S/ {0} por {1} articulos.", totalPay04, quantity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment