+ 1

Write a program to discount all of the prices and output a new price list. Need help, plase 🙂

namespace SoloLearn { class Program { static void Main(string[] args) { int discount = Convert.ToInt32(Console.ReadLine()); Dictionary<string, int> coffee = new Dictionary<string, int>(); coffee.Add("Americano", 50); coffee.Add("Latte", 70 ); coffee.Add("Flat White", 60); coffee.Add("Espresso", 60 ); coffee.Add("Cappuccino", 80); coffee.Add("Mocha", 90 ); foreach (string s in coffee.Keys) { Console.WriteLine(s + ": " + coffee[s]); } } }

22nd Dec 2020, 10:38 PM
Bogdan Constantin
Bogdan Constantin - avatar
1 Respuesta
- 1
Hint: Use the percentage formula
22nd Dec 2020, 10:44 PM
Kevin ★