import java.util.Scanner;
public class suhuBapak {
public static void main (String [] args){
Scanner input = new Scanner (System.in);
int celcius;
float reamur,fahrenhait,kelvin;
System.out.println(" Masukan suhu kedalam derajat celcius: ");
celcius = input.nextInt();
reamur = 4f/5f*celcius;
fahrenhait = 9f/5f*celcius+32f;
kelvin = celcius +273;
System.out.println("reamur :" +reamur);
System.out.println("fahrenhait :" + fahrenhait);
System.out.println("kelvin :" +kelvin);
}
}
thanks bro atas ilmunya
BalasHapusmaksud "f" di 4f/5f*celcius float bukan gan?
BalasHapusManjur bos, tapi makna “f” pada 4f/5f*celcius itu apa???
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapus