예제 #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);
        }