- #1
ritwik06
- 580
- 0
Homework Statement
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");
choice=System.in.read();
---------
----
---
--
Problem
This thing give me the ASCII value of th choice I enter. How to convert it to Integer? Pleas do hlp soon.
Last edited: