Problem on displaying Celcius
Hello,
For a class project I have to make a program, witch it gets the temperature (fahrenheit) in 5 different Station and after I have to compute the mean temperature, check the hightest/lowest. Until here I did all without problems, but i have to display the result in fahrenheit and celcius and I have trouble to get the right visualization in celcius. Can someone give me some tips ?
I'm gonna past just part of my code but I think that's enough
Code Java:
for(Index = 0 ; Index < Station ; Index++)
{
System.out.print("Enter Station Temperature: ");
List[Index] = Input.nextDouble();
Total += List[Index]; // Adding all the temperature
}
Celcius = (5 * (List[0] - 32) / 9); // Convert temperature to Celcius
Mean = Total/Station; // Calculate the mean temperature
for(Index = 0 ; Index < Station ; Index++)
{
if(List[Index] > Hightest)
Hightest = List[Index];
if(List[Index] < Lowest);
Lowest = List[Index];
}
Thanks in advance for any suggestions
Re: Problem on displaying Celcius
Hello Superteo1987.
Welcome to the Java Programming Forums.
Ideally, you will need to post something we can compile. I can see what you are trying to do though.
I would take this one step at a time to get each part working on it's own.
I would start with getting the temperatures added to the List array correctly.