//******************************************************************** // TempConverter.java // Practice Lab2 // //******************************************************************** public class TempConverter { //----------------------------------------------------------------- // Use a specific Celsius value using the formula F = (9/5)C + 32, // and displays the next five temperatures, at intervals of 10 degrees //----------------------------------------------------------------- public static void main (String[] args) { final int BASE = 32; final double CONVERSION_FACTOR = 9.0 / 5.0; int celsiusTemp = 30; // value to convert double fahrenheitTemp; fahrenheitTemp = celsiusTemp * CONVERSION_FACTOR + BASE; System.out.println ("Celsius Temperature: " + celsiusTemp); System.out.println ("Fahrenheit Equivalent: " + fahrenheitTemp); } }