oleh:
arif zainurrohman
public class logika {
public static void main (String [] args)
{
System.out.println("Operasi AND");
System.out.println("true && true = " + (true && true));
System.out.println("true && false = " + (true && false));
System.out.println("false && true = " + (false && true));
System.out.println("false && false = " + (false && false));
System.out.println("\nOperasi OR");
System.out.println("true || true = " + (true || true));
System.out.println("true || false = " + (true || false));
System.out.println("false || true = " + (false || true));
System.out.println("false || false = " + (false || false));
System.out.println("\nOperasi NOT");
System.out.println("!true = " + (!true));
System.out.println("!false = " + (!false));
}
}
public static void main (String [] args)
{
System.out.println("Operasi AND");
System.out.println("true && true = " + (true && true));
System.out.println("true && false = " + (true && false));
System.out.println("false && true = " + (false && true));
System.out.println("false && false = " + (false && false));
System.out.println("\nOperasi OR");
System.out.println("true || true = " + (true || true));
System.out.println("true || false = " + (true || false));
System.out.println("false || true = " + (false || true));
System.out.println("false || false = " + (false || false));
System.out.println("\nOperasi NOT");
System.out.println("!true = " + (!true));
System.out.println("!false = " + (!false));
}
}
Praktikum
Ibu kota , 5 muharram 1435 H
0 komentar:
Posting Komentar