Saturday, 2 December 2017

C# Program to Convert Fahrenheit to Celsius


Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Celsius
{
    class Program
    {
        static void Main(string[] args)
        {
            double celsius;
            Console.Write("Enter Fahrenheit temperature : ");
            double fahrenheit = Convert.ToDouble(Console.ReadLine());
            celsius = (fahrenheit - 32) * 5 / 9;
            Console.WriteLine("The converted Celsius temperature is" + celsius);
            Console.ReadLine();
        }
    }
}


Output:

Output:
Enter Fahrenheit temperature : 95.5
The converted Celsius temperature is35.2777777777778


More C# Programs:























100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...