public double InputData() { Console.WriteLine("Enter the temperature in Fahrenheit: "); var taskInputTemperature = new InputDoubleData(); return(taskInputTemperature.InputData()); }
public double InputData() { double percentDeposit; Console.WriteLine("Enter the non zero interest on the deposit: "); var taskInput = new InputDoubleData(); do { percentDeposit = taskInput.InputData(); if (percentDeposit <= 0) { Console.WriteLine("Invalid input. Please, repeat the input:"); } else { break; } } while (true); return(percentDeposit); }