static void Main() { Decompose ob = new Decompose(); int i; double f; i = ob.GetParts(10.125, out f); Console.WriteLine("Integer portion is " + i); Console.WriteLine("Fractional part is " + f); }
static void Main(string[] args) { Console.WriteLine("Введите число : "); string input = Console.ReadLine(); double n = Convert.ToDouble(input); int whole; double frac; whole = Decompose.GetParts(n, out frac); Console.WriteLine("Целая часть = {0}; дробная часть числа = {1}", whole, frac); }