import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter the temperature in Fahrenheit: ");
         double temperature = input.nextDouble();

         System.out.print("Enter the wind speed miles per hour: ");
         double windSpeed = input.nextDouble();

         input.close();

         if(temperature >= -58 && temperature <= 41 && windSpeed >= 2)
         {
             double windChillIndex = 35.74 + 0.6215 * temperature - 35.75 * Math.pow(windSpeed, 0.16)
             + 0.4275 * temperature * Math.pow(windSpeed, 0.16);
             System.out.println("The wind chill index is " + windChillIndex);
         }
         else
             System.out.println("The input value is invalid");
     }
 }

最新文章

  1. HTML DOM总结
  2. Android无需申请权限拨打电话
  3. Webbrowser中显示MHT文件
  4. 【转】java开源类库pinyin4j的使用
  5. POJ 3398 Perfect Service --最小支配集
  6. MyEclipse内存溢出问题解决方法
  7. grep&#39; \b\b&#39;
  8. Linux C 程序 字符串函数(12)
  9. Vs 2008 解决方案的目录结构设置和管理(转)
  10. GC算法精解(五分钟教你终极算法---分代搜集算法)
  11. C# 初步学习
  12. 将[4,3,2,5,4,3]分割成[4,3,2]、[5,4,3]两个List的算法
  13. AOP的简单练习
  14. Microsoft AI - Custom Vision
  15. C# WebService创建与使用
  16. 虚拟机Ubuntu18.04——gcc版本的升降
  17. java用POI操作excel——随便写一下,最基础的东西
  18. eclipse team 没有svn
  19. HDU6124
  20. Python3学习笔记13-函数的参数

热门文章

  1. Python OptionParser学习
  2. HTTP错误 404.17
  3. android apk 反编译
  4. 第三章—Windows程序
  5. Bootstrap 貌似不错,先做一下记录
  6. android TabActivity的局限性 是否还有存在的必要性
  7. ANDROID_MARS学习笔记_S01原始版_014_WIFI
  8. 酷盘kanbox获得B轮2000万美元融资
  9. 解决win8.1右键菜单出现在左边
  10. 关于方程x^2+y^2=p (p为素数)的解问题