Rabu, 24 April 2013

perhitungan suhu celcius ke fahrenheit

public class suhu
{

public static void main(String args[])



{


int celcius;
int fahrenheit;
System.out.printf("\2=");
Scanner input = new Scanner(System.in);
celcius = input.nextInt();



fahrenheit = (9/5 * celcius) + 32;
System.out.println("nilainya dalam fahrenheit = " + fahrenheit);



}



}

Tidak ada komentar:

Posting Komentar