import jeliot.io.*;
public class konversi{
private float fahrenheit(int celcius){
return (celcius*1.8)+32;
}
public float kelvin(int celcius){
return celcius + 273.15;
}
public float reamur(int celcius){
return celcius*0.8;
}
public static void main(){
konversi x = new konversi();
int celcius;
System.out.print("Masukkan suhu anda :"); //dalam celcius
celcius=Input.readInt();
System.out.print("Konversi suhu dalam fahrenheit =");
System.out.print(x.fahrenheit(celcius));
System.out.print("\n");
System.out.print("Konversi suhu dalam kelvin =");
System.out.print(x.kelvin(celcius));
System.out.print("\n");
System.out.print("Konversi suhu dalam reamur =");
System.out.print(x.reamur(celcius));
System.out.print("\n");
}
}
public class konversi{
private float fahrenheit(int celcius){
return (celcius*1.8)+32;
}
public float kelvin(int celcius){
return celcius + 273.15;
}
public float reamur(int celcius){
return celcius*0.8;
}
public static void main(){
konversi x = new konversi();
int celcius;
System.out.print("Masukkan suhu anda :"); //dalam celcius
celcius=Input.readInt();
System.out.print("Konversi suhu dalam fahrenheit =");
System.out.print(x.fahrenheit(celcius));
System.out.print("\n");
System.out.print("Konversi suhu dalam kelvin =");
System.out.print(x.kelvin(celcius));
System.out.print("\n");
System.out.print("Konversi suhu dalam reamur =");
System.out.print(x.reamur(celcius));
System.out.print("\n");
}
}
0 komentar:
Posting Komentar