using System.Collections.Generic;
public static void Main()
Dictionary<int, int> dict = new Dictionary<int, int>();
Random key = new Random();
Random prize = new Random();
for (int i = 0; i < 10; i++)
dict.TryGetValue(k, out p);
dict.Add(k, prize.Next(1, 10001));
Console.WriteLine("Please input two integers (both from 1 to 20,in one line):");
List<int> list = new List<int>();
string input = Console.ReadLine();
string[] tokens = input.Split();
foreach (string s in tokens)
bool success = int.TryParse(s, out num);
Console.WriteLine("quit");
else if ((list[0] >= 1 && list[0] <= 20) && (list[1] >= 1 && list[1] <= 20))
dict.TryGetValue(list[0], out value1);
dict.TryGetValue(list[1], out value2);
Console.WriteLine("You earned " + (value1 + value2) + " in total!");
Console.WriteLine("quit");