public void DisplayRegressionInfo(bool isPolynomial, int degree, RegressionCalculator calculator) { Console.WriteLine("c: " + C); if (isPolynomial) { for (int i = 0; i < degree; i++) { Console.WriteLine("b" + (i + 1) + " : " + B[i]); } } else { for (int i = 0; i < calculator.NumberOfXVariables; i++) { Console.WriteLine("b" + (i + 1) + " : " + B[i]); } } bool askForFunctionValue = true; while (askForFunctionValue) { Console.WriteLine("\nWould you like to know the value of regression function for your parameters?\n(Y/N)"); string input = Console.ReadLine(); input = input.ToUpper(); if (input == "Y") { Console.Clear(); AskUserForFunctionValue(calculator, isPolynomial, degree); } else { askForFunctionValue = false; } } }