static void Main(string[] args) { Clear(); Write("1.Exercise Flagpole\n2.Exercise Packaging\n3.Exercise Colorful Village\n4.Math exercise\n5.Bouncing ball simulate\n6.Equation Solve\n7.FizzBuzz Problem\nSelect the order: "); var inputString = ReadLine(); int orderSelected = 0; try { orderSelected = int.Parse(inputString); } catch (FormatException) { orderSelected = 0; } switch (orderSelected) { case 1: FlagPoleProblem.Run(); break; case 2: PackageProblem.Run(); break; case 3: ColorfulVillageProblem.Run(); break; case 4: MathExercise.Run(); break; case 5: BouncingBallSimulate.Run(); break; case 6: EquationSolve.Run(); break; case 7: FizzBuzzProblem.Run(); break; } WriteLine("Program Terminate"); ReadKey(); }
static void Main(string[] args) { double solution1; solution1 = EquationSolve.SolveEquation(-1.0, -2.0, -3.0); double l1; l1 = geometry.CalculateVector2DLength(2.0, 4.0); double l2; l2 = geometry.CalculateDistance2D(0.0, 0.0, 2.0, 2.0); double l3; l3 = geometry.CalculateVector3DLength(1.0, 2.0, 3.0); double l4; l4 = geometry.GetSphereVolume(4.0); double l5; l5 = geometry.GetRectangleArea(4.0, 5.0); double l6; l6 = Utils.GetMinValue(2, 3); double l7; l7 = Utils.GetMaxValue(2, 3); bool l8; l8 = Utils.IsEven(42); Ejercicio.Ejercicio1(); Ejercicio.Ejercicio2(43); }