25 lines
877 B
Java
25 lines
877 B
Java
class Aufgabe {
|
|
public static void main(String[] args) {
|
|
int i = 5;
|
|
int j = 3;
|
|
boolean b = false;
|
|
|
|
/*
|
|
* a.) (!((i<j) && b)) - boolean (true)
|
|
* b.) i/j - int (1)
|
|
* c.) (float) (i/j) - float (1.0)
|
|
* d.) (float) i/j - float (1.6)
|
|
* e.) (float) i / (float) j - float (1.6)
|
|
* f.) ((i++ == 5) || (--i == 5)) - boolean (true)
|
|
* g.) ((i++ == 5) | (--i == 5)) - int (1)
|
|
*/
|
|
|
|
System.out.println("a.) " + (!((i<j) && b)));
|
|
System.out.println("b.) " + (i/j));
|
|
System.out.println("c.) " + (float) (i/j));
|
|
System.out.println("d.) " + ((float) i/j));
|
|
System.out.println("e.) " + ((float) i / (float) j));
|
|
System.out.println("f.) " + (((i++ == 5) || (--i == 5))));
|
|
System.out.println("g.) " + (((i++ == 5) | (--i == 5))));
|
|
}
|
|
} |