This is my first attempt at coding. I am completely frustrated and need any help you can give me. I am supposed to take the values in the main method and in the next 2 (these are the ones i am trying to write from scratch) make the values in fahrenheit go from fahrenheit to celsius and then prin them out.
CODE
public class TemperatureConverter {
public static void main(String[] args) {
double[] fahrenheit = {-40.0, 0.0, 32.0,
50.0, 68.0, 75.0, 98.7, 100.0, 212.0};
convertAndPrint(fahrenheit);
}
public static void convertAndPrint(double[] tempArray){
double i = 0;
for ( tempArray[0] = 0; i < tempArray.length; tempArray[0]++);
i = i - 32 * 5/9;
conversion(i);
}
public static double conversion(double celsius) {
System.out.println(celsius);
return celsius;
}
}