@@ -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 |
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module type="JAVA_MODULE" version="4"> | |||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | |||
<exclude-output /> | |||
<content url="file://$MODULE_DIR$"> | |||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |||
</content> | |||
<orderEntry type="inheritedJdk" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
</component> | |||
</module> |
@@ -0,0 +1,23 @@ | |||
package prak1; | |||
public class Main { | |||
public static void main(String[] args) { | |||
int previousValue = 0; | |||
for (int i = 0; i < 200; i++) { | |||
if (i == 0) { | |||
continue; | |||
} else if (i % 5 == 0) { | |||
System.out.println(i + " ist durch 5 teilbar!"); | |||
} else if (Integer.toString(i).endsWith("9")) { | |||
System.out.println(i + " endet auf 9!"); | |||
} else if ((i + previousValue) % 3 == 0) { | |||
int res = i + previousValue; | |||
System.out.println(i + " und " + previousValue + " addiert ergeben " + res + " und " + res + " ist durch 3 teilbar."); | |||
} | |||
previousValue = i; | |||
} | |||
} | |||
} |