DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

mike's picture

Unregistered

Feeds

aliases

  • mike

mike

7 months ago

in Java while-do and do-while loop syntax | Java programming | Tech-Recipes on Tech-Recipes
I need a java program that will repeatedly read temperatures in Fahrenheit and convert them to Celsius until a temperature > 212 F is entered. I really need this, please, and thank you. mbnumba14@yahoo.com(email address)

Here is my java program:
import java.util.*;
// Converter.java
public class Converter
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter temp: ");
int temp = sc.nextInt();
System.out.println(convertToC(temp));
}
public static int convertToC(int temp)
{
return ((temp - 32 ) * 5/9);
}
}
.
Returning? Login