Using Using Using Using Using Namespace Class Static Void String Float Float

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Faculty of Engineering &Technology

Subject Name:
Subject Code:
B.Tech ___ Year ___Semester ___

Annexure No:

Aim : Write a C# code to Perform Celsius to Fahrenheit Conversion and Fahrenheit to Celsius conversion.

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

namespace word
{
class hello
{
static void Main(string[] args)
{
float celsius, farenheit;
Console.WriteLine("Enter the temperature in Celsius:");
celsius = float.Parse(Console.ReadLine());
farenheit = (celsius * 9 / 5 ) + 32;
Console.WriteLine("Temperature in Farenheit is:");
Console.Write(farenheit);
Console.ReadLine();
}
}
}

Enrollment No : Page No:

You might also like