コード例 #1
0
        public static RNum GetNum()
        {
            Console.WriteLine("Number: ");
            string str = Console.ReadLine();
            double a   = CheckNum(str);

            RNum r = RNum.GetNumberFromStr(a);

            return(r);
        }
コード例 #2
0
        public static RNum GetFraction()
        {
            Console.WriteLine("Fraction: ");
            string str = Console.ReadLine();

            while (!CheckFraction(str))
            {
                Console.Write("Incorrect input, repeat: ");
                str = Console.ReadLine();
            }

            RNum r = RNum.GetFractionFromStr(str);

            return(r);
        }