using System;

namespace RecipeApp
{
class Recipe
{
public string[] Ingredients { get; set; }
public string[] Steps { get; set; }

public void DisplayRecipe()
{
Console.WriteLine("Ingredients:");
foreach (string ingredient in Ingredients)
{
Console.WriteLine("- " + ingredient);
}

Console.WriteLine("\nSteps:");
for (int i = 0; i < Steps.Length; i++)
{
Console.WriteLine((i + 1) + ". " + Steps[i]);
}
}

public void ScaleRecipe(double factor)
{
Console.WriteLine("\nScaled Recipe:");
foreach (string ingredient in Ingredients)
{
string[] parts = ingredient.Split(' ');
double quantity = Convert.ToDouble(parts[0]) * factor;
Console.WriteLine("- " + quantity + " " + parts[1] + " " + parts[2]);
}
}
}

class Program
{
static void Main(string[] args)
{
Recipe recipe = new Recipe();

Console.Write("Enter the number of ingredients: ");
int numIngredients = Convert.ToInt32(Console.ReadLine());
string[] ingredients = new string[numIngredients];
for (int i = 0; i < numIngredients; i++)
{
Console.Write("Enter ingredient " + (i + 1) + ": ");
string ingredient = Console.ReadLine();

Console.Write("Enter the quantity " + (i + 1) + ": ");
string quantity = Console.ReadLine();

Console.Write("Enter the measurement " + (i + 1) + " (cup, Kg, ml, L, g): ");
string measurement = Console.ReadLine();

ingredients[i] = quantity + " " + measurement + " " + ingredient;
}
recipe.Ingredients = ingredients;

Console.Write("\nEnter the number of steps: ");
int numSteps = Convert.ToInt32(Console.ReadLine());
string[] steps = new string[numSteps];
for (int i = 0; i < numSteps; i++)
{
Console.Write("Enter step " + (i + 1) + ": ");
steps[i] = Console.ReadLine();
}
recipe.Steps = steps;

recipe.DisplayRecipe();

Console.Write("\nEnter a scaling factor (0.5, 2, or 3): ");
double factor = Convert.ToDouble(Console.ReadLine());
recipe.ScaleRecipe(factor);

Console.WriteLine("\nPress any key to clear recipe and enter a new one...");
Console.ReadKey();
Console.Clear();

Main(args);
}
}
}

aloow the user to be able to changed the scale back to the original scale after it was changed

You can allow the user to change the scale back to the original scale by adding a condition in the `ScaleRecipe` method. Here's an updated version of the `ScaleRecipe` method that allows the user to enter a scaling factor or enter '1' to revert back to the original scale:

```csharp
public void ScaleRecipe(double factor)
{
if (factor == 1)
{
Console.WriteLine("\nOriginal Recipe:");
foreach (string ingredient in Ingredients)
{
Console.WriteLine("- " + ingredient);
}
}
else
{
Console.WriteLine("\nScaled Recipe:");
foreach (string ingredient in Ingredients)
{
string[] parts = ingredient.Split(' ');
double quantity = Convert.ToDouble(parts[0]) * factor;
Console.WriteLine("- " + quantity + " " + parts[1] + " " + parts[2]);
}
}
}
```

Now, when the user is prompted to enter a scaling factor, they can enter '1' to see the original recipe before any scaling was applied.