Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class If
- {
- public static void main (String[] args){
- double v, t, wci;
- Scanner scan = new Scanner(System.in);
- System.out.println("Please enter the wind speed in miles per hour ");
- v = scan.nextDouble();
- System.out.println("Please enter the temperature in Fahrenheit");
- t = scan.nextDouble();
- wci = 0.0;
- if (0 <= v)
- if (v <= 4)
- wci = t;
- else
- if (v >= 45)
- wci = (1.6 * t) - 55;
- else
- wci = 91.4 + (91.4 - t) * (0.0203 * v - 0.304 * (v*Math.sqrt(0.5)) - 0.474);
- System.out.println("The wci is: " + wci);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement