In this tutorial we are going to make a Temperature converter which can convert Celsius to Fahrenheit in C# Console Application.
Before start the tutorial, we have to know how to convert Celsius to Fahrenheit
Formule: F=(C * 1.8) + 32
Here is the program
1 2 3 4 5 6 7 8 9 10 11 12 |
double F, C; Console.WriteLine("\n\n www.csharp-console-examples.com \n\n"); Console.Write("Enter a Celsius:"); C = Convert.ToDouble(Console.ReadLine()); F = (C * 1.8) + 32; Console.WriteLine("Celsius:{0} -> Fahrenheit :{1}",C,F); Console.ReadLine(); |
Output:
You can find more similar examples of programming for this programming language in the site.