Hello again guys,
I am having some trouble here not sure what is going on. I have gotten my program to show Celsius to Fahrenheit. However, it is not showing Fahrenheit to Celsius. I am trying to put it into chart form as well.
Below is code:
public static void main(String[] args) { java.util.Scanner input = new java.util.Scanner(System.in); System.out.println(" "); for (double i = 31; i < 41; i++) { System.out.println("Celcius: " + i + " is " + celsiusToFahrenheit(i) + " in Fahrenheit"); } for (double f = 120; f < 104; f++){ System.out.println("Fahrenheit: " + f + " is " + fahrenheitToCelsius(f) + " in Celsius");} } public static double celsiusToFahrenheit(double i) { return (9.0 / 5) * i +32; } public static double fahrenheitToCelsius(double f) { return (5.0 / 9) * f - 32; } }