public static CommonBuckshot operator *(CommonBuckshot first, CommonBuckshot second) { var ruteBuckshot = new CommonBuckshot(first.numerator * second.numerator, first.denumerator * second.denumerator); ruteBuckshot.CutBuckshot(); return(ruteBuckshot); }
public static void Main(string[] args) { string input = Input(); if (TypeOfBuckshot(input) == 1) { string[] array = input.Split("/"); CommonBuckshot buckshot = new CommonBuckshot(int.Parse(array[0]), int.Parse(array[1])); Console.WriteLine(buckshot.ConvertToDecimalBuckshot()); } else { CommonBuckshot arr = ConvertToCommonBuckshot(Convert.ToDouble(input)); arr.CutBuckshot(); Console.WriteLine(arr.ToString()); } }