Hey everyone i want to start by saying i am very new to java so i had an issue i wanted to see if anyone can give me a solution. i basically have to make a program that displays a table that shows temperatures from celsius to fahrenheit from 40 degrees celsius down to 31 degrees celsius and convert them to fahrenheit on one side of the table, and on the other side of the table have 120 fahrenheit down to 30 degrees fahrenheit and convert them to celsius.
here is my code so far (i have not yet done the print line to display any of this in a table yet)
public class celsius{
public static void main(String[] args){
for(double celsius=40; celsius<=31.0; celsius--){
System.out.print(celsiusToFahrenheit(fahrenheit));
for(double fahrenheit=120; fahrenheit<=30.0; fahrenheit--){
System.out.print(fahrenheitToCelsius(celsius));
}
}
}
public static double celsiusToFahrenheit(double celsius){
return celsius=(5.0/9.0) * fahrenheit - 32;
}
public static double fahrenheitToCelsius(double fahrenheit){
return fahrenheit=(9.0/5) * celsius + 32;
}
}
i am getting a cannot find symbol error in line 7 i think it has something to do with not declaring the variable fahrenheit somewhere but i dont know where.
any help is appreciated