Browse Source

Stand 001/14.10/15:14

main
Tim Rummel 2 months ago
commit
7d6786be81
10 changed files with 116 additions and 0 deletions
  1. 29
    0
      .gitignore
  2. 8
    0
      .idea/.gitignore
  3. 6
    0
      .idea/misc.xml
  4. 8
    0
      .idea/modules.xml
  5. 6
    0
      .idea/vcs.xml
  6. 11
    0
      Prog 3 A.iml
  7. BIN
      src/HelloWorld.class
  8. 6
    0
      src/HelloWorld.java
  9. 9
    0
      src/Main.java
  10. 33
    0
      src/praktikum01/Zahlenfilter.java

+ 29
- 0
.gitignore View File

@@ -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

+ 8
- 0
.idea/.gitignore View File

@@ -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

+ 6
- 0
.idea/misc.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="openjdk-22" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Prog 3 A.iml" filepath="$PROJECT_DIR$/Prog 3 A.iml" />
</modules>
</component>
</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 11
- 0
Prog 3 A.iml View File

@@ -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>

BIN
src/HelloWorld.class View File


+ 6
- 0
src/HelloWorld.java View File

@@ -0,0 +1,6 @@
public class HelloWorld {
public static void main(String[] args) {

System.out.println("Hello World!");
}
}

+ 9
- 0
src/Main.java View File

@@ -0,0 +1,9 @@
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {

System.out.println("Hello World!");
}

}

+ 33
- 0
src/praktikum01/Zahlenfilter.java View File

@@ -0,0 +1,33 @@
package praktikum01;

public class Zahlenfilter {
static int temp = 0;

public static void main(String[] args) {

for (int i = 0; i < 200; i++ ){

System.out.println("Zahl |" +i+"|");

//DURCH 5 TEILBAR---------------------------------------------------//

if (i % 5== 0){
System.out.println("--------> ["+i+"] ist durch 5 teilbar!");
}

//AM ENDE EINE 9---------------------------------------------------//
if (i %10 ==9){
System.out.println("--------> [" +i+"] ist endet auf 9!");
}

//ADDIERT DURCH 3 TEILBAR -----------------------------------------//
if ((i + temp) % 3 ==0){
int ergebnis = i +temp;
System.out.println("--------> ["+i+"] und [" +temp+ "] Addiert ergeben [" +ergebnis + "] und [" +ergebnis+ "] ist durch 3 teilbar");
}
//ZUWEISUNG TEMP WERT----------------------------------------------//
temp = i;

}
}
}

Loading…
Cancel
Save