I need to call a program from cmd using an array of numbers(mandatory) and an int time(optional). I have never done this so i'm a bit shaky on the details.
The path is D:\Robert\FactorialConsoleApplication\FactorialConsoleApplication\bin\Debug\FactorialConsoleApplication.exe
As you can tell, the program calculates the factorial of the numbers in the array. The int time is used as a delay in order to display the progress of the stack.
How do I call the program with parameters? Thanks in advance!
P.S. Here is some of the code
class Program
{
    public static void Progress(ProgressEventArgs e)
    {
        int result = e.getPartialResult;
        int stack_value = e.getValue ;
        double max = System.Convert.ToDouble(numbers[j]);
        System.Convert.ToDouble(stack_value);
        double percent = (stack_value / max) * 100;
        Console.CursorLeft = 18;
        Console.Write(result + " ");
        Console.CursorLeft = 46;
        Console.Write(System.Convert.ToInt32(percent) + "%      ");
    }
    public static void Calculate(int number, int time=0)
    {
        Factorial Fact = new Factorial();
        Fact.Progression += new Factorial.ProgressEventHandler(Progress);
        Console.Write("\n" + "Partial results : ");
        Console.CursorLeft = 35;
        Console.Write("Progress : ");         
        int Result = Fact.CalculateFactorial(number, time);
        Console.WriteLine(" ");
        Console.WriteLine("The factorial of " + number + " is : " + Result);
        Console.ReadLine();
    }
    static int j;
    static int[] numbers;
    public static void Main(string[] args)
    {
        int i=0;
        bool ok = false;
        string line = string.Empty;
        numbers = new int[10];
        Console.Write("Please insert wait time (0,1 or 2) : ");
        int time = int.Parse(Console.ReadLine()) * 1000;
        Console.Write("Please insert a number : ");
        do
        {
            line = Console.ReadLine();
            if (line != "")
            {
                i++;
                numbers[i] = int.Parse(line);
            }
            else
            {
                ok = true;
            }
        }
        while (ok == false);
        for (j = 1; j <= i; j++)
        {
            Calculate(numbers[j],time);
        }
    }
}
 
    