import java.util.Scanner; // bring in Scanner class so we can use it public class CelciusToFaran /** This class converts degrees Celcius to Faranheit * and we Introduce Reading input here as well. **/ { public static void main(String[] args) { /** Formula is: (9/5)*c + 32; * note: putting pseudocode in as a comment is recommended. */ // prompt the user System.out.print("Enter a degrees celcius: "); double celcius; // Read in from the keyboard a value for celcius // we must create a Scanner object that will be connected to keyboard Scanner in = new Scanner(System.in); celcius = in.nextDouble(); double faran = 9/5.0*celcius+32; System.out.println("celcius=" + celcius + " faran= " + faran); // some more methods of the Scanner class // nextInt() next() nextLine() System.out.print("Enter an integer"); int num = in.nextInt(); System.out.println("You entered " + num); System.out.print("Enter a string"); String str = in.next(); System.out.println("You entered " + str); } }