Konversi suhu Celcius Fahrenhait Reamur Kelvin dengan java
Posted by Unknown |  at 09:53
No comments
public class konversi_suhu{
public static void main (String[] args){
double suhuC = 0;
double suhuR = 0;
double suhuF = 0;
double suhuK = 0;
case "Celcius":
{
oF = oC x 1,8 + 32
suhuF = (1.8 * y + 32);
suhuK = (y + 273);
System.out.println ("Hasil Konversi dari Celcius ke Fahrenheit:" +suhuF);
System.out.println ("Hasil Konversi dari Celcius ke Kelvin :" +suhuK);
System.out.println ("Good Job");
break;
} }
case "Fahrenheit":
{
suhuC = 0.56 *(y - 32);
suhuR = 0.4 *(y - 32);
suhuK = (y + 459) / 1.8;
System.out.println ("Hasil Konversi dari Fahrenheit ke Celcius:" +suhuC);
System.out.println ("Hasil Konversi dari Fahrenheit ke Kelvin :" +suhuK);
System.out.println ("Good Job");
break;
}
case "Kelvin":
Tagged as: Java, Tugas Kuliah
About the Author
Share This Post
Related posts
0 comments: