Write a program in C# that accepts the temperature in Centigrade and converts into Fahrenheit..
Following is the simple C# code :
Output:-
Following is the simple C# code :
class Lab { static void Main(string[] args) { int tempInCelsius, tempInFaren; Console.WriteLine("Enter the Temperature in Celsius(°C) : "); tempInCelsius = int.Parse(Console.ReadLine()); tempInFaren = (tempInCelsius * 9) / 5 + 32; Console.WriteLine("Temperature in Fahrenheit is(°F) : " + tempInFaren); Console.ReadLine(); } }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.