Copyright © Jejak Obeng
Design by Dzignine
Rabu, 28 September 2011

JAVA - Suhu

Gambar 1. hasil running suhu.class
 
Script :

import java.util.Scanner;

class suhu{
public static void main(String[] args)
{
int c;
Scanner n = new Scanner (System.in);

System.out.print ("Celcius : ");
c = n.nextInt();

System.out.println("Celcius to Fahrenheit : " + ((c + 32) * 9 / 5 ));
System.out.println("Celcius to Kelvin : " + (c + 273));
System.out.println("Celcius to Reamur : " + (c * 4/5 ));
}
}

0 komentar:

Posting Komentar