Write a C# program to check whether a given substring is present in the given string

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

Add a Comment

Your email address will not be published. Required fields are marked *