C# Program to Convert a Temperature From Fahrenheit Into Celsius

Sometimes we get frustrated if we do not get the information we need in some articles. But this article has all the information you need when you read C# Program to Convert a Temperature From Fahrenheit Into Celsius. Read patiently and understand.

C# Program to Convert a Temperature From Fahrenheit Into Celsius

C# Program to Convert a Temperature From Fahrenheit Into Celsius

//C# program to convert a Fahrenheit temperature into Celsius.

using System;

class Program
{
    static double convertToCelsius(double ferTemp)
    {
        double cTemp = 0;

        cTemp = (ferTemp - 32) * 5 / 9;
        return cTemp;
    }
    static void Main(string[] args)
    {
        double celTemp=0;
        double ferTemp=0;
        
        Console.Write("Enter the value of temperature in Fahrenheite(°F): ");
        ferTemp = double.Parse(Console.ReadLine());

        celTemp = convertToCelsius(ferTemp);
        Console.WriteLine("Celsius temperature is(°C) : " + celTemp);
    }
}
Enter the value of temperature in Fahrenheite(°F): 90.5
Celsius temperature is(°C) : 32.5
Press any key to continue . . .

Final Words

We hope the C# Program to Convert a Temperature From Fahrenheit Into Celsius article helped you in some way. And let us know if you have any doubts. Thanks

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment