program java


/**
* @(#)tugas1_1.java
*
*
* @author
* @version 1.00 2008/12/29
*/

import java.io.* ;
public class tugas1_1 {
public static void main(String args[]) throws IOException {
BufferedReader inputStream = new BufferedReader (new InputStreamReader(System.in));
int a, b, c, x;

System.out.print(“Berikan nilai a: “);
a = Integer.valueOf(inputStream.readLine().trim()).intValue();
System.out.print(“Berikan nilai b: “);
b = Integer.valueOf(inputStream.readLine().trim()).intValue();
System.out.print(“Berikan nilai c: “);
c = Integer.valueOf(inputStream.readLine().trim()).intValue();

if(a > b && a > c)
x = a;
else if(b > a && b > c)
x = b;
else
x = c;

System.out.println(“Bilangan terbesar antara a = ” + a + “, b = ” + b +”, dan c = ” + c + ” adalah : ” + x);
}
}

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s