static void Main(string[] args) { var conversion = new TempConverter(); Console.WriteLine(conversion.FahrenheitToCelsius(32)); Console.WriteLine(conversion.CelsiusToFahrenheit(0)); }
static void Main(string[] args) { var celsius = TempConverter.FahrenheitToCelsius(50); var fahrenheit = TempConverter.CelsiusToFahrenheit(30); Console.WriteLine($"50 degrees Fahrenheit is {celsius} Celcius."); // should be 10 Console.WriteLine($"30 degrees Celcius is {fahrenheit} Fahrenheit."); // should be 86 }
static void Main(string[] args) { var celcius = TempConverter.FahrenheitToCelsius(68); var fahrenheit = TempConverter.CelsiusToFahrenheit(20); Console.WriteLine($"Celcius: {celcius}"); Console.WriteLine($"Fahrenheit: {fahrenheit}"); }
static void Main(string[] args) { var celsius = TempConverter.FahrenheitToCelsius(25); var fahrenheit = TempConverter.CelsiusToFahrenheit(25); Console.WriteLine($"C = {celsius}, F = {fahrenheit}"); }
static void Main(string[] args) { Console.WriteLine(TempConverter.FahrenheitToCelsius(32)); Console.WriteLine(TempConverter.CelsiusToFahrenheit(0)); Console.WriteLine(TempConverter.FahrenheitToCelsius(212)); Console.WriteLine(TempConverter.CelsiusToFahrenheit(100)); }
static void Main(string[] args) { var celius = TempConverter.FahrenheitToCelsius(161.6); var fahenheit = TempConverter.CelsiusToFahrenheit(72); Console.WriteLine($"celcius {celius}"); Console.WriteLine($"Fahrenheit {fahenheit}"); }
static void Main(string[] args) { var celsius = TempConverter.FahrenheitToCelsius(72); Console.WriteLine($"{celsius} degrees"); var fahrenheit = TempConverter.CelsiusToFahrenheit(32); Console.WriteLine($"{fahrenheit} Degrees"); }
static void Main(string[] args) { var celcius = TempConverter.FahrenheitToCelsius(68); // 20 var fahrenheit = TempConverter.CelsiusToFahrenheit(29); // 68 Console.WriteLine("After conversion:"); Console.WriteLine($" celcius {celcius}"); Console.WriteLine($"fahrenheit {fahrenheit}"); }
static void Main(string[] args) { var Celsius = TempConverter.FahrenheitToCelsius(25); Console.WriteLine($"This is {Celsius} degrees celsius."); var Fahrenheit = TempConverter.CelsiusToFahrenheit(40); Console.WriteLine($"This is {Fahrenheit} degrees fahrenheit"); }
static void Main(string[] args) { Console.WriteLine("After Conversion:"); var f = TempConverter.CelsiusToFahrenheit(28); var c = TempConverter.FahrenheitToCelsius(68); Console.WriteLine($"28 degrees in Celsius is {f} degrees in Farenheit."); Console.WriteLine($"68 degrees in Fahrenheit is {c} degrees in Celsius."); }
static void Main(string[] args) { //Console.WriteLine("Please enter a temperature to convert to Fahrenheit"); //Console.ReadLine() = Console.WriteLine($"Temp is {TempConverter.CelsiusToFahrenheit(45)}"); //Console.WriteLine("Please enter a temperature to convert to Celsius"); //Console.ReadLine() = Console.WriteLine($"Celsius temp is {TempConverter.FahrenheitToCelsius(45)}"); }
static void Main(string[] args) { Console.Write("Please specify a Fahrenheit temp to convert to Celsius: "); var cel = TempConverter.FahrenheitToCelsius(Convert.ToDouble(Console.ReadLine())); Console.WriteLine($"The Celsius temp would be {cel}"); Console.WriteLine(); Console.Write("Please specify a Celsius temp to convert to Fahrenheit: "); var fahr = TempConverter.CelsiusToFahrenheit(Convert.ToDouble(Console.ReadLine())); Console.WriteLine($"The Fahrenheit temp would be {fahr}"); }
static void Main(string[] args) { Console.WriteLine("Enter Celsius to convert"); var cel = double.Parse(Console.ReadLine()); Console.WriteLine($"C {cel} is F:{TempConverter.CelsiusToFahrenheit(cel):#,###.#}"); Console.WriteLine("Enter Fahrenheit to convert"); var fahren = double.Parse(Console.ReadLine()); Console.WriteLine($"F {fahren} is C:{TempConverter.FahrenheitToCelsius(fahren):#,###.#}"); }
static void Main(string[] args) { var temp = 100; var fTemp = TempConverter.CelsiusToFahrenheit(temp); Console.WriteLine(fTemp); var cTemp = TempConverter.FahrenheitToCelsius(fTemp); Console.WriteLine(cTemp); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine(); Console.WriteLine("After Conversion:"); Console.WriteLine("-----------------------------"); var celsius = TempConverter.FahrenheitToCelsius(86); Console.WriteLine($" {celsius} Celsius."); var fahrenheit = TempConverter.CelsiusToFahrenheit(34); Console.WriteLine($" {fahrenheit} Fahrenheit."); }
static void Main(string[] args) { Console.WriteLine("Hello user. Welcome to my Temp Converter application."); Console.WriteLine("Please enter a temp in Fahrenheit to convert into Celsius."); double f = double.Parse(Console.ReadLine()); Console.WriteLine($"You temp in Celsius is : {TempConverter.FahrenheitToCelsius(f)}."); Console.WriteLine("Now, please enter a temp in Celsius to convert into Fahrenheit. "); double c = double.Parse(Console.ReadLine()); Console.WriteLine($"Your temp in Fahrenheit is : {TempConverter.CelsiusToFahrenheit(c)}."); Console.WriteLine($"We have your tmeps as {TempConverter.FahrenheitToCelsius(f)} for the first and {TempConverter.CelsiusToFahrenheit(c)} for the second.\n End program."); }
static void Main(string[] args) { Console.WriteLine("Temperature Conversions"); Console.WriteLine(); var num1 = 0.0; var num2 = 32.0; var num3 = 100.0; var num4 = 212.0; var result1 = TempConverter.FahrenheitToCelsius(num4); var result2 = TempConverter.FahrenheitToCelsius(num2); var result3 = TempConverter.CelsiusToFahrenheit(num1); var result4 = TempConverter.CelsiusToFahrenheit(num3); Console.WriteLine("Critical test data points - coming and going"); Console.Write("Boiling Point: "); Console.WriteLine($"{num4}F = {result1}C"); Console.Write("Freezing Point: "); Console.WriteLine($"{num2}F = {result2}C"); Console.Write("Freezing Point: "); Console.WriteLine($"{num1}C = {result3}F"); Console.Write("Boiling Point: "); Console.WriteLine($"{num3}C = {result4}F"); Console.Write("Enter a number in Fahrenheit to be converted to Celsius: "); var fNum = Convert.ToDouble(Console.ReadLine()); var fCalc = TempConverter.FahrenheitToCelsius(fNum); Console.WriteLine($"{fCalc} degrees Celsius"); Console.WriteLine(); Console.Write("Enter a number in Celsius to be converted to Fahrenheit: "); var cNum = Convert.ToDouble(Console.ReadLine()); var cCalc = TempConverter.CelsiusToFahrenheit(cNum); Console.WriteLine($"{cCalc} degrees Celsius"); Console.WriteLine(); }
static void Main(string[] args) { Console.WriteLine("Is your temperature in C or F?"); string temp = Console.ReadLine().ToLower(); if (temp == "c") { Console.WriteLine("What is your Celsius temperature?"); double C = Convert.ToDouble(Console.ReadLine()); var CFinal = TempConverter.CelsiusToFahrenheit(C); Console.WriteLine($"Your tempature is {CFinal} in Fahrenheit."); } else if (temp == "f") { Console.WriteLine("What is your Fahrenheit temperature?"); double F = Convert.ToDouble(Console.ReadLine()); var FFinal = TempConverter.FahrenheitToCelsius(F); Console.WriteLine($"Your tempature is {FFinal} in Celsius."); } }
static void Main(string[] args) { TempConverter.FahrenheitToCelsius(200); Console.WriteLine(); TempConverter.CelsiusToFahrenheit(150); }
static void Main(string[] args) { Console.WriteLine($"10 Fahrenheit = {TempConverter.FahrenheitToCelsius(10)} celcius"); Console.WriteLine($"50 Celcius = {TempConverter.CelsiusToFahrenheit(50)} Fahrenheit"); }
static void Main(string[] args) { TempConverter.FahrenheitToCelsius(80); TempConverter.CelsiusToFahrenheit(20); }
static void Main(string[] args) { Console.WriteLine("32 F is " + TempConverter.FahrenheitToCelsius(32) + " C"); Console.WriteLine("100 C is " + TempConverter.CelsiusToFahrenheit(100) + " F"); }