জাভা প্রোগ্রামিং পর্ব-১৫



2.17* (Science: wind-chill temperature) How cold is it outside? The temperature alone is not enough to provide the answer. Other factors including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed. The formula is given as follows:







Code : File name-WindChillTemp.java
import java.util.*;
import javax.swing.*;
public class WindChillTemp {
    public static void main (String arg[]){
        Scanner input = new Scanner(System.in);
        double temp, windSpeed, windChill;
        System.out.print("Enter the tempereture in fahrenheit: = ");
        temp = input.nextDouble();

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

        windChill=(35.74+0.6215*temp-35.75*Math.pow(windSpeed, 0.16+0.4275*temp*Math.pow(windSpeed, 0.16)));
        System.out.print ("The wind chill index is: = " + windChill);
        }
    }

Loading
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Flying Twitter Bird Widget By ICT Sparkle