axeefectushka

Untitled

Oct 15th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         double w, t, v;
  8.         Console.Write("Enter the temperature: ");
  9.         t = Convert.ToDouble(Console.ReadLine());
  10.         Console.Write("Enter the wind speed: ");
  11.         v = Convert.ToDouble(Console.ReadLine());
  12.         t = t * 9 / 5 + 32;
  13.         v *= 2.237;
  14.         w = 35.74 + 0.6125 * t + (0.4275 * t - 33.75) * Math.Pow(v, 0.16);
  15.         Console.WriteLine($"The effective air temperature is {w}");
  16.         if (Math.Abs(t) > 50 || v < 3 || v > 120)
  17.         {
  18.             Console.WriteLine("The result may be incorrect.");
  19.         }
  20.         Console.ReadKey();
  21.     }
  22. }
Add Comment
Please, Sign In to add comment