Вы находитесь на странице: 1из 2

/*

* To change this license header, choose License Headers in Project Properties.


* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tugas2;

import java.util.Scanner;

/**
*
* @author asus
*/
public class Tugas2 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here

Scanner scan=new Scanner(System.in);

System.out.println("----------------------");

System.out.println(" tugas ");

System.out.println(" Pemrograman Berorientasi Obyek Praktek ");

System.out.println("���������������");
System.out.println(" Menghitung Konversi Suhu ");

System.out.println(" Celcius ke Kelvin, Fahrenheit, dan Reamur ");

System.out.println("���������������");

int suhu;
double kelvin, fahrenheit, reamur;

String menu="celsius";
String menu2 ="kelvin";

System.out.print("Masukkan suhu 1.celsius 2.fahrenheit 3.kelvin 4.reamur:


");
int inNomor = scan.nextInt();

if (inNomor == 1)
{

System.out.println("Pilihan anda =" +menu);


System.out.print("suhu celsius: ");
int celsius = scan.nextInt();

kelvin = 273+ celsius;

fahrenheit = celsius * 9/5 +32 ;

reamur = celsius*4/5 ;

System.out.println("Celcius ke Kelvin : "+kelvin);

System.out.println("Celcius ke Fahrenheit : "+fahrenheit);

System.out.println("Celcius ke Reamur : "+reamur);

else if (inNomor == 2)
{

System.out.println("Pilihan anda =" +menu2);

System.out.print("suhu kelvin: ");


kelvin = scan.nextInt();

double celsius = kelvin-273;

fahrenheit = (kelvin-273)*9/5 +32 ;

reamur = kelvin-273*4/5;

System.out.println("kelvin ke celsius : "+celsius);

System.out.println("Celcius ke Fahrenheit : "+fahrenheit);

System.out.println("Celcius ke Reamur : "+reamur);

}
}

http://subanimen.blogspot.com/2013/12/cheat-gta-san-andreas-untuk-pc.html
https://drive.google.com/uc?
export=download&confirm=AAZp&id=1affbncbJgWwi2OnSHRfUVnbUgG_HKwdt
https://drive.google.com/uc?id=1sAWc6U7pD9aqobODqH6TGOsYiWmNAh-A&export=download
https://www.academia.edu/32478975/Logika_Matematika
https://drive.google.com/uc?id=1MezlLDdhy1VAvX_Mmp7WrKi7Uqp_NQxh&export=download

Вам также может понравиться