Esempio n. 1
0
 private string GetAns(string type, string task)
 {
     type = GetTypeOfTheTask(type);
     return(type switch
     {
         "math" => MathSolution.GetAns(task),
         "polynomial-root" => PolynomsSolver.GetRoot(task),
         "shape" => ShapeSolver.GetAns(task),
         "determinant" => MatrixDetSolver.GetAns(task),
         "cypher" => Caesar.GetAns(task),
         "string-number" => StringNumber.GetNumber(task),
         "starter" => "42",
         "inverse-matrix" => InverseMatrix.GetAnswer(task),
         _ => string.Empty
     });
Esempio n. 2
0
 private string GetAns(string type, string task)
 {
     type = GetTypeOfTheTask(type);
     return(type switch
     {
         "math" => MathSolution.GetAns(task),
         "polynomial-root" => PolynomsSolver.GetRoot(task),
         "shape" => ShapeSolver.GetAnswer(task),
         "determinant" => MatrixDetSolver.GetAns(task),
         "cypher" => Caesar.GetAns(task),
         "string-number" => StringNumber.StringToNumber(task),
         "starter" => "42",
         "json" => Json.GetAnswer(task),
         "inverse-matrix" => InverseMatrix.GetAnswer(task),
         _ => "Я не знаю тип задания, помогите"
     });