Untitled

mail@pastecode.io avatar
unknown
csharp
7 months ago
2.3 kB
1
Indexable
Never
namespace Simula_sSoup
{
    internal class Program
    {
        static void Main(string[] args)
        {
            (string, string, string) meal;
            
            int mealType;
            Console.WriteLine("Please choose a type:");
            Console.WriteLine("1. Soup\n2. Stew\n3. Gumbo");
            mealType = Convert.ToInt32(Console.ReadLine());
            Console.Clear();
            if (mealType == 1)
                meal.Item1 = Convert.ToString(Type.Soup);
            else if (mealType == 2)
                meal.Item1 = Convert.ToString(Type.Stew);
            else
                meal.Item1 = Convert.ToString(Type.Gumbo);

            int ingredient;
            Console.WriteLine("Please choose a main ingredient:");
            Console.WriteLine("1. Mushrooms\n2. Chicken\n3. Carrots\n4. Potatoes");
            ingredient = Convert.ToInt32(Console.ReadLine());
            Console.Clear();
            if (ingredient == 1)
                meal.Item2 = Convert.ToString(MainIngredient.Mushroom);
            else if (ingredient == 2)
                meal.Item2 = Convert.ToString(MainIngredient.Chicken);
            else if (ingredient == 3)
                meal.Item2 = Convert.ToString(MainIngredient.Carrot);
            else
                meal.Item2 = Convert.ToString(MainIngredient.Potato);
            
            int seasoningChoice;
            Console.WriteLine("Please choose a seasoning:");
            Console.WriteLine("1. Spicy\n2. Salty\n3. Sweet");
            seasoningChoice = Convert.ToInt32(Console.ReadLine());
            Console.Clear();
            if (seasoningChoice == 1)
                meal.Item3 = Convert.ToString(Seasoning.Spicy);
            else if (seasoningChoice == 2)
                meal.Item3 = Convert.ToString(Seasoning.Salty);
            else
                meal.Item3 = Convert.ToString(Seasoning.Sweet);

            Console.WriteLine($"{meal.Item3} {meal.Item2} {meal.Item1}");
            Console.ReadKey();
        }
    }

    enum Type
    {
        Soup,
        Stew,
        Gumbo
    }

    enum MainIngredient
    {
        Mushroom,
        Chicken,
        Carrot,
        Potato
    }

    enum Seasoning
    {
        Spicy,
        Salty,
        Sweet
    }
}