C# Program to convert celcius to farenheit

Introduction

C# Program to convert celcius to farenheit. 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 Celsius : ");
            celsius = Convert.ToDouble(Console.ReadLine());           
            fahrenheit = (1.8 * celsius) + 32;      
            Console.WriteLine("Temperature in Fahrenheit : "+ fahrenheit);                  
            Console.ReadKey();
        }
    }
}

Result

C# Program to convert celcius to farenheit
C# Program to convert celcius to farenheit

Leave a Comment