using System;
class Program
{
static double FahrenheitToCelsius(double f) {
double t;
t = (f - 32) * (5.0 / 9.0);
return t;
}
static void Main() {
try {
Console.Write("Enter Temperature in Fahrenheit: ");
double temp_f = Convert.ToDouble(Console.ReadLine());
double temp_c = FahrenheitToCelsius(temp_f);
Console.WriteLine("{0:F2} Fahrenheit = {1:F2} Celsius\n", temp_f, temp_c);
}
catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
/*
run:
Enter Temperature in Fahrenheit: 1
1.00 Fahrenheit = -17.22 Celsius
Enter Temperature in Fahrenheit: 50
50.00 Fahrenheit = 10.00 Celsius
*/