public static RNum GetNum() { Console.WriteLine("Number: "); string str = Console.ReadLine(); double a = CheckNum(str); RNum r = RNum.GetNumberFromStr(a); return(r); }
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); }