Sabtu, 24 Februari 2018

Cara mudah program Relasi Demo

Malem guys kali ini ane mau kasih cara mudah buat program tentang relasi demo, dibawah berupa source code nyaa.

Input program Relasi Demo;


package projectpbo1;

public class ProjectPBO1 {
public static void main(String[] args) { int i = 37;
int j = 42; int k = 42;
System.out.println("Nilaivariabel...");
System.out.println(" i = " + i);
System.out.println(" j = " + j);
System.out.println(" k = " + k);
System.out.println("Lebih besar dari...");
System.out.println(" i > j = " + (i > j));
System.out.println(" k > j = " + (k > j));
System.out.println("Lebih besar dari atau sama dengan...");
System.out.println(" i >= j = " + (i >= j));
System.out.println(" j >= i = " + (j >= i));
System.out.println("Lebih kecil dari...");
System.out.println(" i < j = " + (i < j));
System.out.println("Lebih kecil dari atau sama dengan...");
System.out.println(" j <= i = " + (j <= i));
System.out.println(" k <= j = " + (k <= j));
System.out.println("Sama dengan...");
System.out.println(" k == j = " + (k == j));
System.out.println("Tidak sama dengan...");
System.out.println(" k != j = " + (k != j));
}
}


Maka nanti akan muncul ouput berikut;




Tidak ada komentar:

Posting Komentar