How to convert celsius to fahrenheit in C#

1 Answer

0 votes
using System;
  
class Program
{
    public static double CelsiusToFahrenheit(double c) {
            return ((9.0 / 5.0) * c) + 32;
    }
  
    static void Main()
    {
        int c = 100;

        Console.WriteLine("{0} = {1}", c, CelsiusToFahrenheit(c));
    }
}
  
  
   
   
/*
run:
  
100 = 212
  
*/

 



answered Sep 14, 2020 by avibootz

Related questions

1 answer 135 views
3 answers 346 views
346 views asked May 2, 2015 by avibootz
1 answer 128 views
1 answer 131 views
1 answer 117 views
...