public static void DisplayCelciusConversion()
        {
            Console.Write("Please enter the degrees in Celcius (whole numbers only): ");
            var celcius = Convert.ToInt32(Console.ReadLine());

            AddSpaces(1);

            Console.Write($"The temperature converted to degrees in Fahrenheit: {TempConverter.CelciusToFahrenheit(celcius)}");
        }
        public static void DisplayFahrenheitConversion()
        {
            Console.Write("Please enter the degrees in Fahrenheit (whole numbers only): ");
            var fahrenheit = Convert.ToInt32(Console.ReadLine());

            AddSpaces(1);

            Console.Write($"The temperature converted to degrees of Celcius: {TempConverter.FahrenheitToCelcius(fahrenheit)}");
        }
예제 #3
0
        static void Main(string[] args)
        {
            Console.WriteLine(TempConverter.FahrenheitToCelcius(32));

            Console.WriteLine(TempConverter.CelciusToFahrenheit(0));

            Console.WriteLine(TempConverter.CelciusToFahrenheit(100));

            Console.WriteLine(TempConverter.FahrenheitToCelcius(212));
        }