1. PF Contest - Win "Conquering the Physics GRE" book! Click Here to Enter
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Very Simple Java Program.

  1. May 9, 2007 #1
    1. The problem statement, all variables and given/known data
    Write a program to calculate the Fahrenheit temperature from Celsius Temperature and vice Versa using appropriate menu.

    2. The attempt at a solution

    class prog
    static void choice(String args[])
    throws java.io.IOException
    int choice=0;
    System.out.print("Enter 1 to Change F to c");
    System.out.print("Enter 2 to Change c to F");

    This thing give me the ASCII value of th choice I enter. How to convert it to Integer? Pleas do hlp soon.
    Last edited: May 9, 2007
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted