示例#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
     });
示例#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),
         _ => "Я не знаю тип задания, помогите"
     });
示例#3
0
        private string GetAns(string type, string task)
        {
            task = GetTypeOfTheTask(type);
            switch (type)
            {
            case "math": return(MathSolution.GetAns(task));

            case "polynomial-root": return(PolynomsSolver.GetRoot(task));

            case "shape": return(ShapeSolver.GetAns(task));

            case "determinant": return(MatrixDetSolver.GetAns(task));

            case "cypher": return(Caesar.GetAns(task));

            case "string-number": return(StringNumber.GetNumber(task));

            case "starter": return("42");

            default: return(string.Empty);
            }
        }