Q:

Write a C# program to convert from celsius degrees to Kelvin and Fahrenheit

0

Write a C# program to convert from celsius degrees to Kelvin and Fahrenheit

kelvin = celsius + 273
fahrenheit = celsius x 18 / 10 + 32

Sample Output:

Enter the amount of celsius: 40                                                                               
Kelvin = 313                                                                                                  
Fahrenheit = 104

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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);
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now