matt.d1848's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 6 (0.05 per day)
- Joined:
- 30-January 13
- Profile Views:
- 29
- Last Active:
Feb 09 2013 12:22 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Help with having the program run again
Posted 6 Feb 2013
Thank you for the help greatly appreciate it -
In Topic: Help with having the program run again
Posted 6 Feb 2013
Thank you i can now take in the the char, i put an 's' at the end of arg and i made nextLine(); to next(); one more question now my program wont make the letter capital why is that? -
In Topic: how to get my program to run
Posted 1 Feb 2013
when i put in the numbers it crashes right after when it gets to the two methods i wrote. -
In Topic: how to get my program to run
Posted 30 Jan 2013
so i'm getting this to run but it says i still have errors
import java.util.Scanner; public class HeatIndexCalculator { public int currentTemp; public double currenHumidity; double heatIndex; double calculatedHeatIndex; double c1 = -42.379; double c2 = 2.04901523; double c3 = 10.14333127; double c4 = -.22475541; double c5 = -.00683783; double c6 = -.05481717; double c7 = .00122874; double c8 = -.00085282; double c9 = -.00000199; public double calculateHeatIndex(int currentTemp, double currentHumidity){ double one; double two; double three; double four; one = c1+c2*currentTemp+c3*currentHumidity; two = c4*currentTemp*currentHumidity+c5*(currentTemp*currentTemp); three= c6*(currentHumidity*currentHumidity )+c7*(currentTemp*currentTemp)*currentHumidity; four = c8*currentTemp*(currentHumidity*currentHumidity)+c9*(currentTemp*currentTemp)*(currentHumidity*currentHumidity); heatIndex=one+two+three+four; return heatIndex; } public void printHeatIndex(int currentTemp, double currentHumidity){ System.out.printf("At a temperature of %i F and a humidity of %i percent\n",currentTemp,currentHumidity); System.out.printf("It actually feels like:%i F", calculateHeatIndex(currentTemp,currentHumidity)); } public static void main(String[] arg){ Scanner input = new Scanner (System.in); int a; double b; System.out.println("Please enter the current temperature in degrees fahrenheit"); a=input.nextInt(); System.out.println("please enter the current humidity as a percentage"); b=input.nextDouble(); input.close(); HeatIndexCalculator test1 = new HeatIndexCalculator(); test1.calculateHeatIndex(a, B)/>; test1.printHeatIndex(a, B)/>; } }
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
matt.d1848 hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
matt.d1848 has no profile comments yet. Why not say hello?