Q:

C# Program to convert farenheit to celcius

0

C# Program to convert farenheit to celcius.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

This program is compiled and tested on a Visual Studio 2012..

using System;

namespace TechStudyCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            double celsius, fahrenheit;          
            Console.WriteLine("Enter Temperature in Fahrenheit : ");
            fahrenheit = Convert.ToDouble(Console.ReadLine());
            celsius = (fahrenheit - 32) * 5 / 9;
            Console.WriteLine("Temperature in Celsius : " + celsius);                  
            Console.ReadKey();
        }
    }
}

Result:

Enter Temperature in Fahrenheit : 

98.6

Temperature in Celsius : 37

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Program to find the Size of data types... >>
<< C# Program to convert celcius to farenheit...