Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

05. Temperature Conversion

VelizarAvramov Nov 17th, 2018 67 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. using System;
  2.  
  3. namespace _05._Temperature_Conversion
  4. {
  5.     class TempConversation
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double fahrenheit = double.Parse(Console.ReadLine());
  10.  
  11.             double celsius = GetCelsius(fahrenheit);
  12.             Console.WriteLine($"{celsius:f2}");
  13.  
  14.         }
  15.  
  16.         static double GetCelsius(double fahrenheit)
  17.         {
  18.             double cels = (fahrenheit - 32) * 5 / 9;
  19.             return cels;
  20.         }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top