Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text.RegularExpressions;
- namespace Learning
- {
- /* */
- class ListsExer_Problem02
- {
- static void Main()
- {
- //SortedDictionary<string, string> myContacts = new SortedDictionary<string, string>();
- //myContacts["Aglika"] = "+359 887 206 407";
- //myContacts["Yana MM"] = "+359 886 735 722";
- //myContacts["Kotseto TediMuerte"] = "+359 877 333 377";
- //myContacts["Taxi Yellow"] = "+359 2 91119";
- //myContacts["Fazzi"] = "+359 876 655 420";
- //string aglikaNum = myContacts["Aglika"];
- //Console.WriteLine(aglikaNum);
- //foreach (var contact in myContacts)
- //{
- // var name = contact.Key;
- // var number = contact.Value;
- // Console.WriteLine($"{name}: {number}");
- //}
- //Dictionary<char, int> numberLetterRepeatsInText = new Dictionary<char, int>();
- //numberLetterRepeatsInText['a'] = 1000;
- //numberLetterRepeatsInText['b'] = 670;
- //numberLetterRepeatsInText['c'] = 623;
- //numberLetterRepeatsInText['d'] = 344;
- //numberLetterRepeatsInText['e'] = 812;
- //foreach(KeyValuePair<char, int> letterRepetition in numberLetterRepeatsInText)
- //{
- // char letter = letterRepetition.Key;
- // int timesRepeated = letterRepetition.Value;
- // Console.WriteLine($"The letter \"{letter}\" repeats {timesRepeated} times in the given text.");
- //}
- Dictionary<string, List<double>> studentRecords = new Dictionary<string, List<double>>();
- studentRecords["Angel"] = new List<double>();
- studentRecords["Angel"].Add(5.50);
- studentRecords["Angel"].Add(4.75);
- studentRecords["Angel"].Add(5.25);
- //Console.WriteLine("Angel: {0}", studentRecords["Angel"]);
- foreach(var angelsRecord in studentRecords)
- {
- var name = angelsRecord.Key;
- Console.WriteLine("{0}'s marks: ", name);
- foreach(var grade in angelsRecord.Value)
- {
- Console.WriteLine("\t\t{0} ", grade);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment