// Task 2 public static void Run(double value) { OutputService.ShowMessage($"Bytes = {value}\n"); OutputService.ShowMessage($"Kilobytes = {ValueConverter.GetCalcResult(value, (int)Pow(2, (int)CoefEnum.kilobytes))}\n"); OutputService.ShowMessage($"Megabytes = {ValueConverter.GetCalcResult(value, (int)Pow(2, (int)CoefEnum.megabytes))}\n"); OutputService.ShowMessage($"Gigabytes = {ValueConverter.GetCalcResult(value, (int)Pow(2, (int)CoefEnum.gigabytes))}\n"); }
public static void Run(double candiesWeght, double gelatinousWeight) { OutputService.ShowMessage($"Candies price / 1kg {candiesPricePerKg}\n"); OutputService.ShowMessage($"Gelatinous price / 1kg {gelatinousPricePerKg}\n"); double candiesPrice = candiesPricePerKg * candiesWeght; double gelatinousPrice = gelatinousPricePerKg * gelatinousWeight; OutputService.ShowMessage($"The coef of the price of candies to gelatines: {Round(candiesPrice/gelatinousPrice, 2)}"); }