- 2

Help! c# tutorial final question Module 9

Dictionary< , int> d = Dictionary<string, >(); .Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d name );

14th Feb 2019, 6:10 PM
Bayode Emmanuel Olaseeni
Bayode Emmanuel Olaseeni - avatar
6 ответов
+ 6
Dictionary<string, int> d = new Dictionary<string, int>(); d.Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d[name]);
12th Jul 2019, 5:57 PM
Nikhil Bollu
0
Dictionary<string, int> d = new Dictionary<string, int>(); d.Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d[name]);
11th Dec 2019, 10:34 PM
Abdul Rhman Bayoumi Mohammed
0
Answer: Dictionary<string, int> d = new Dictionary<string, int>(); d.Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d[name]);
10th Jan 2020, 7:58 AM
Đào Ngọc Tuấn Anh
Đào Ngọc Tuấn Anh - avatar
0
Answer Dictionary<string, int> d = New Dictionary<string,int >(); d.Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d[name]);
5th Apr 2020, 10:28 AM
Kadar Hassan Daud
Kadar Hassan Daud - avatar
0
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); //your code goes here foreach (KeyValuePair<string, int> entry in coffee) { Console.WriteLine(entry.Key + ": " + (entry.Value - entry.Value * discount / 100)); } }
20th Sep 2021, 5:45 AM
Jobayrul Hasan
Jobayrul Hasan - avatar
0
Dictionary< string , int> d = new Dictionary<string, int >(); d .Add("John", 24); d.Add("Ann", 18); d.Add("Peter", 27); string name = "John"; Console.Write(d [ name ] );
13th Sep 2022, 4:39 PM
Haleema Alkhaleifi