From e8fcfde21b386e76f4c285a9a7218d38dcda3457 Mon Sep 17 00:00:00 2001 From: "roman.schenk37@gmail.com" <84532681+romanschenk37@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:30:44 +0200 Subject: [PATCH] nicht kompilierbare Zeile auskommentiert. --- .idea/.gitignore | 8 ++++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 ++++ .idea/runConfigurations.xml | 10 +++++ .idea/vcs.xml | 6 +++ 02_Praktikum-2_Ausdruck.iml | 11 +++++ Ausdruck.java | 86 ++++++++++++++++++------------------- 7 files changed, 91 insertions(+), 44 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 .idea/vcs.xml create mode 100644 02_Praktikum-2_Ausdruck.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..6bc01a8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ed9ef46 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/02_Praktikum-2_Ausdruck.iml b/02_Praktikum-2_Ausdruck.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/02_Praktikum-2_Ausdruck.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Ausdruck.java b/Ausdruck.java index a118f4c..ad27da9 100644 --- a/Ausdruck.java +++ b/Ausdruck.java @@ -2,53 +2,51 @@ public class Ausdruck { - public void ausgeben() { - int int1 = 1, int2 = 2, int3 = 3; - double double1 = 3.0, double2 = 4.0; - boolean boolean1 = true; - System.out.println(int1 + int2 + int3--); - System.out.println(int3); - System.out.println(--int3); - - int3 = 3; - System.out.println(int1 + int2 * int3); - System.out.println((int1 + int2) * int3); - - System.out.println(int1 / int2 + ", " + int3 / int2); - System.out.println(int1 / double1 + ", " + double2 / int3); - System.out.println(int1 / 4 + ", " + int1 / 4.0); - - System.out.println (int2 / int3 * double1); - System.out.println (int2 / (int3 * double1)); - - System.out.println(9 % 4 + ", " + 9.0 % 4); - - System.out.println("Ein Hund hat " + 2 + 2 + " Beine"); - System.out.println("Ein Hund hat " + (2 + 2) + " Beine"); - System.out.println("Zwei Hunde haben " + 2 * 4 + " Beine"); - - System.out.println(int1 == int2); - System.out.println(int1 == int3 / int2); - - System.out.println((int3 <= 3) && (double2 <= 2.999999)); - System.out.println((int3 < 3) || !(double2 <= 2.999999)); - System.out.println((int3 <= 3) && !(double2 <= 2.999999)); - - System.out.println(boolean1 = 7 > 6); - System.out.println(int3 = int1 + int2 == 3); - System.out.println((int3 = int2 - int1) == 1); - - System.out.println(3 * 1000000); - System.out.println(3 * 10000000); - System.out.println(3 * 100000000); - System.out.println(3 * 1000000000); - System.out.println(3 * 1000000000L); - System.out.println(3 * 1000000000d); - } public static void main(String[] args) { - (new Ausdruck()).ausgeben(); + int int1 = 1, int2 = 2, int3 = 3; + double double1 = 3.0, double2 = 4.0; + boolean boolean1 = true; + + System.out.println(int1 + int2 + int3--); + System.out.println(int3); + System.out.println(--int3); + + int3 = 3; + System.out.println(int1 + int2 * int3); + System.out.println((int1 + int2) * int3); + + System.out.println(int1 / int2 + ", " + int3 / int2); + System.out.println(int1 / double1 + ", " + double2 / int3); + System.out.println(int1 / 4 + ", " + int1 / 4.0); + + System.out.println (int2 / int3 * double1); + System.out.println (int2 / (int3 * double1)); + + System.out.println(9 % 4 + ", " + 9.0 % 4); + + System.out.println("Ein Hund hat " + 2 + 2 + " Beine"); + System.out.println("Ein Hund hat " + (2 + 2) + " Beine"); + System.out.println("Zwei Hunde haben " + 2 * 4 + " Beine"); + + System.out.println(int1 == int2); + System.out.println(int1 == int3 / int2); + + System.out.println((int3 <= 3) && (double2 <= 2.999999)); + System.out.println((int3 < 3) || !(double2 <= 2.999999)); + System.out.println((int3 <= 3) && !(double2 <= 2.999999)); + + System.out.println(boolean1 = 7 > 6); + //System.out.println(int3 = int1 + int2 == 3); + System.out.println((int3 = int2 - int1) == 1); + + System.out.println(3 * 1000000); + System.out.println(3 * 10000000); + System.out.println(3 * 100000000); + System.out.println(3 * 1000000000); + System.out.println(3 * 1000000000L); + System.out.println(3 * 1000000000d); } }