C# Program to Perform Celsius to Fahrenheit Conversion. - Amit Notes

Latest

Jul 16, 2021

C# Program to Perform Celsius to Fahrenheit Conversion.

 C# Program to Perform Celsius to Fahrenheit Conversion.

Code: -

/*

 * C# Program to Perform Celsius to Fahrenheit Conversion

 */

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace program

{

    class Program

    {

        static void Main(string[] args)

        {

            int celsius, faren;

            Console.WriteLine("Enter the Temperature in Celsius(°C) : ");

            celsius = int.Parse(Console.ReadLine());

            faren = (celsius * 9) / 5 + 32;

            Console.WriteLine("0Temperature in Fahrenheit is(°F) : " + faren);

            Console.ReadLine();

 

        }

    }

}

 

Runtime Test Cases: -

 Enter the Temperature in Celsius (°C) :  20

Temperature in Fahrenheit(°F)  is  : 68


-----------------------------END----------------------------------

1.Read More about - Check whether a number is a palindrome or not?

2.Read More about - Write a C# Sharp program to find whether a given year is a leap year or not.

3.Read More about - C# Program to Reverse a String with Predefined Function.

No comments:

Post a Comment

If you have any doubts, Please let me know