Stand 001/14.10/15:14
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
@@ -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!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user