Skip to content

Instantly share code, notes, and snippets.

@RMcGee
Created September 11, 2013 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RMcGee/6526646 to your computer and use it in GitHub Desktop.
Save RMcGee/6526646 to your computer and use it in GitHub Desktop.
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