[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.1747175 [View]
File: 5 KB, 194x157, Untitled.jpg [View same] [iqdb] [saucenao] [google]
1747175

I needz help. Can someone debug my celcius to Fahrenheit java program?

import java.util.Scanner;
public class Temp
{
public static void main( String[] args)
{
Scanner input = new Scanner(System.in);
String name;
System.out.println("What is the Cel temp you would like to convert to Fahrenheit?");
celcius = input.nextLine();
farhrenheit = (9/5) * celcius +32;
System.out.println(celcius + " is " + farhrenheit + "in farhrenheit");

}
}

Navigation
View posts[+24][+48][+96]