C# program to convert centigrade to fahrenheit can be implemented by using following formula
$F = 32+\frac{9*C}{5}$
Here, value of $F$ is the temperature in fahrenheit while $C$ is the temperature in centigrade.
Fahrenheit and Centigrade are two well known temperature scales. Both of them are used regularly in daily temperature measurements. By using above formula, the following C# program produces output in fahrenheit ($^{\circ}F$) while taking centigrade ($^{\circ}C$) as input.
Page content(s):
Additional content(s):
1. C# Program & output to convert centigrade to fahrenheit
Code has been copied
/*********************************************** alphabetacoder.com C# program to convert Centigrade To Fahrenheit ***********************************************/ using System; namespace CentigradeToFahrenheit { class Program { static void Main(string[] args) { // declare variables double f,c; //take input in centigrade Console.Write("Enter the temperature in centigrade = "); c = Convert.ToDouble(Console.ReadLine()); //convert Centigrade to Fahrenheit f=32+(9*c)/5; // display result Console.WriteLine("Temperature is "+f+" in fahrenheit When "+c+" in centigrade."); // wait for user to press any key Console.ReadKey(); } } }
Output
Enter the temperature in centigrade = 100
Temperature is 212 in fahrenheit When 100 in centigrade.