using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab { internal class SplitNumber { public double first { get; private set; } public double second { get; private set; } public double Value { get { return first + second; } set { first = Math.Truncate(value); second = Math.Abs(value - first); second = Math.Round(second, 10); if (second >= 1) { first += 1; second = 0; } } } public void Multiply(double m) { Value = Value * m; } } }