Created
September 11, 2013 17:05
-
-
Save RMcGee/6526646 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FahrenheitToCelcius | |
{ | |
class Program | |
{ /* | |
* Purpose: Convert Fahrenheit to Celcius | |
* Author: Reid McGee | |
* Date: September 11, 2013 | |
*/ | |
static void Main(string[] args) | |
{ | |
//Variable Declarations | |
Double fahrenheit, celsius; | |
//Get fahrenheit | |
Console.WriteLine("Enter degrees fahrenheit"); | |
fahrenheit = Double.Parse (Console.ReadLine()); | |
//Calculate an output celsius | |
celsius = (fahrenheit - 32) * 5.0 / 9.0; | |
Console.WriteLine ("{0:0.00} degrees celsius", celsius); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment