+ 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]); } } }
1 Answer
- 1
Hint: Use the percentage formula