commit 749579a6f8ef42498f786372cc6a7154af6a140c Author: moritz Date: Tue Oct 15 15:28:19 2024 +0200 prog3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f68d109 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c3aa11c --- /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..459245b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..930198c --- /dev/null +++ b/src/Main.java @@ -0,0 +1,15 @@ +//TIP To Run code, press or +// click the icon in the gutter. +public class Main { + public static void main(String[] args) { + //TIP Press with your caret at the highlighted text + // to see how IntelliJ IDEA suggests fixing it. + System.out.printf("Hello and welcome!"); + + for (int i = 1; i <= 5; i++) { + //TIP Press to start debugging your code. We have set one breakpoint + // for you, but you can always add more by pressing . + System.out.println("i = " + i); + } + } +} \ No newline at end of file diff --git a/src/helloWorld.java b/src/helloWorld.java new file mode 100644 index 0000000..99b01bf --- /dev/null +++ b/src/helloWorld.java @@ -0,0 +1,5 @@ +public class helloWorld { + public static void main (String[] args){ + System.out.println("Hello World!"); + } +} diff --git a/src/praktikum01/Zahlenfelder.java b/src/praktikum01/Zahlenfelder.java new file mode 100644 index 0000000..495d195 --- /dev/null +++ b/src/praktikum01/Zahlenfelder.java @@ -0,0 +1,26 @@ +package praktikum01; + +public class Zahlenfelder { + public static void main(String[] args) { + + for (int i = 1; i < 201; i++) { + // Wenn durch 5 Teilbar + if (i % 5 == 0) { + System.out.println(i + " - ist durch 5 Teilbar"); + } + wennEndeGleichNeun(i); + + + } + + } + + + public static void wennEndeGleichNeun(int i){ + // Wenn Zahl auf 9 endet + if (i % 10 == 9) { + System.out.println(i + " - endet auf 9"); + } + } +} +