Пример #1
0
        static public void FirstTasks()
        {
            double a, b, c;

            while (true)
            {
                Console.Write("Please input a = ");
                string s = Console.ReadLine();
                if (double.TryParse(s, out a))
                {
                    break;
                }
                else
                {
                    Console.WriteLine("Repeat the command!");
                }
            }

            while (true)
            {
                Console.Write("Please input b = ");
                string s = Console.ReadLine();
                if (double.TryParse(s, out b))
                {
                    break;
                }
                else
                {
                    Console.WriteLine("Repeat the command!");
                }
            }

            while (true)
            {
                Console.Write("Please input c = ");
                string s = Console.ReadLine();
                if (double.TryParse(s, out c))
                {
                    break;
                }
                else
                {
                    Console.WriteLine("Repeat the command!");
                }
            }

            SCPU.Task1(a, b, c);
        }
Пример #2
0
        static public void FirstTasks()
        {
            double a = InputValue("a"), b = InputValue("b"), c = InputValue("c");

            SCPU.Task1(a, b, c);
        }