programming-examples/c-sharp/_Basic/C# Sharp program to convert from celsius degrees to Kelvin and Fahrenheit.cs

11 lines
338 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
using System;
public class Exercise14
{
public static void Main( )
{
Console.Write("Enter the amount of celsius: ");
int celsius = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Kelvin = {0}", celsius + 273);
Console.WriteLine("Fahrenheit = {0}", celsius * 18 / 10 + 32);
}
}