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