Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * * Class: CMSC 2 0 1 * Instructor: Prof. Kash Tajammul * Description: Program Calculations for Wind Chill Temperature * Due: 0 1

/*
* Class: CMSC201
* Instructor: Prof. Kash Tajammul
* Description: Program Calculations for Wind Chill Temperature
* Due: 01/28/2024
* I pledge that I have completed the programming assignment independently.
I have not copied the code from a student or any source.
I have not given my code to any student.
Kevin.Stoute
*/
//Declare package
package WindChillTemperature;
//Import Scanner utility
import java.util.Scanner;
public class WindChillTemperature {
public static void main(String[] args){
// Declare a Scanner object called input to read data from the user.
Scanner input = new Scanner(System.in);
// Obtain outside temperature.
System.out.print("Enter outside temperature between -58 and 41 in Fahrenheit: ");
double outsideTemperature = input.nextDouble();
// Obtain wind speed.
System.out.print("Enter wind speed (>=2) in miles per hour: ");
double windSpeed = input.nextDouble();
// Calculate wind-chill temperature.
double wind_ChillTemperature =
35.74+(0.6215* outsideTemperature)
-(35.75*(Math.pow(windSpeed,0.16)))
+(0.4275* outsideTemperature *(Math.pow(windSpeed,0.16)));
// Display wind-chill temperature.
/* The variable wind_ChillTemperature is converted to float datatype
so that it displays less decimal places. */
System.out.println("The wind chill index is: "+(float) wind_ChillTemperature);
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is shareholders equity? What are its main components?

Answered: 1 week ago