using System.Collections.Generic;
public static Dictionary<int, int> menu = new Dictionary<int, int>();
public static void Main()
Random random = new Random(1);
for(int i = 0; i < 5; i++){
item = random.Next(1, 11);
count = random.Next(1, 11);
if(!menu.ContainsKey(item))
List<int> NoLunch = new List<int>();
foreach (KeyValuePair<int, int> x in menu){
Console.WriteLine("We are now having:");
foreach (KeyValuePair<int, int> x in menu){
Console.WriteLine("Lunch {0}, Count = {1}", x.Key, x.Value);
Console.WriteLine("Please enter a lunch number:");
string order = Console.ReadLine();
bool success = int.TryParse(order, out orderInt);
if ((orderInt >= 1 && orderInt <= 10) && success){
if (menu.ContainsKey(orderInt) && menu[orderInt] > 0) {
Console.WriteLine("You get a lunch {0}! Currently we do not have the following lunches:", orderInt);
for (int i = 1; i < 11; i++){
if (!menu.ContainsKey(i) || menu[i] <=0)
Console.WriteLine("Lunch {0}", i);
Console.WriteLine("We do not have lunch {0} now. Would you like to try lunch {1}?", orderInt, maxlunch);
Console.WriteLine("It is not a valid lunch number.");