programming-examples/c-sharp/Conversions/C# Program to Perform Celsius to Fahrenheit Conversion.cs

28 lines
649 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
/*
* 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();
}
}
}
/*
Enter the Temperature in Celsius (°C) : 20
Temperature in Fahrenheit(°F) is : 68