I wrote a program where I can add the items and if it's more than 250 Euro, 10% discount will be given.
I've used the "if-statement" and I just started only with two numbers. Now, I would like to add as many as I can, is there a way and I would like that the program will stop if there's nothing to add more.
I've researched in Google but it seems I can't find topics on how to deal with it, maybe you guys have an idea. It will be great appreciated.
Thanks, below is my code I made:
This is what I've done:
Console.WriteLine("The price of the first item:");
firstPrice = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("The price of the second item:");
secondPrice = Convert.ToDouble(Console.ReadLine());
theSumValue = firstPrice + secondPrice;
if(theSumValue >= 250)
theSumValue *= 0.9;
Console.WriteLine("The final value in Euro is " + theSumValue);