backup
This commit is contained in:
2
1/.gitingore
Normal file
2
1/.gitingore
Normal file
@@ -0,0 +1,2 @@
|
||||
*.class
|
||||
*.~ava
|
||||
BIN
1/MeinErstesProgramm.class
Normal file
BIN
1/MeinErstesProgramm.class
Normal file
Binary file not shown.
5
1/MeinErstesProgramm.java
Normal file
5
1/MeinErstesProgramm.java
Normal file
@@ -0,0 +1,5 @@
|
||||
public class MeinErstesProgramm {
|
||||
public static void main(String args[]) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
6
1/MeinErstesProgramm.~ava
Normal file
6
1/MeinErstesProgramm.~ava
Normal file
@@ -0,0 +1,6 @@
|
||||
public class MeinErstesProgramm {
|
||||
public static void main(String args[]) {
|
||||
int a = System.in.read();
|
||||
System.out.println("Hello World!" + (a * 4));
|
||||
}
|
||||
}
|
||||
BIN
1/ProgExpr.class
Normal file
BIN
1/ProgExpr.class
Normal file
Binary file not shown.
10
1/ProgExpr.java
Normal file
10
1/ProgExpr.java
Normal file
@@ -0,0 +1,10 @@
|
||||
public class ProgExpr {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000; // VAriable Guthaben deklarieren
|
||||
System.out.println("Guthaben = " + guthaben); // schreiben
|
||||
int einzahlung = 500; // VAriable einzahlung deklarieren
|
||||
System.out.println("Einzahlung = " + einzahlung);
|
||||
guthaben = guthaben + einzahlung; // guthaben + einzahlung
|
||||
System.out.println("Guthaben = " + guthaben); // Ausgabe
|
||||
}
|
||||
}
|
||||
10
1/ProgExpr.~ava
Normal file
10
1/ProgExpr.~ava
Normal file
@@ -0,0 +1,10 @@
|
||||
public class ProgExpr {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000; // VAriable Guthaben deklarieren
|
||||
System.out.println("Guthaben = " + guthaben); // schreiben
|
||||
int einzahlung = 500; // VAriable einzahlung deklarieren
|
||||
System.out.println("Einzahlung = " + einzahlung);
|
||||
guthaben = guthaben + einzahlung; // guthaben + einzahlung
|
||||
System.out.println("Guthaben = " + guthaben); // ausgabe
|
||||
}
|
||||
}
|
||||
BIN
1/ProgFor.class
Normal file
BIN
1/ProgFor.class
Normal file
Binary file not shown.
13
1/ProgFor.java
Normal file
13
1/ProgFor.java
Normal file
@@ -0,0 +1,13 @@
|
||||
public class ProgFor {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000;
|
||||
int einzahlung = 500; // variables deklaration
|
||||
System.out.println("Guthaben = " + guthaben);
|
||||
System.out.println("Einzahlung = " + einzahlung + " pro Monat"); // schreiben text
|
||||
for ( int monat=1; monat<=6; monat = monat + 1 ) { // for-schleife, ausführt scih 6 Mal
|
||||
guthaben += einzahlung; // math-oper, guthaben + einzahlung
|
||||
System.out.println(monat + ". Monat:");
|
||||
System.out.println(" Guthaben = " + guthaben);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
1/ProgFor.~ava
Normal file
13
1/ProgFor.~ava
Normal file
@@ -0,0 +1,13 @@
|
||||
public class ProgFor {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000;
|
||||
int einzahlung = 500; // variables deklaration
|
||||
System.out.println("Guthaben = " + guthaben);
|
||||
System.out.println("Einzahlung = " + einzahlung + " pro Monat"); // schreiben text
|
||||
for ( int monat=1; monat<=6; monat = monat + 1 ) { // for-schleife, ausführt scih 6 Mal
|
||||
guthaben = guthaben + einzahlung; // math-oper, guthaben + einzahlung
|
||||
System.out.println(monat + ". Monat:");
|
||||
System.out.println(" Guthaben = " + guthaben);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
1/ProgIf.class
Normal file
BIN
1/ProgIf.class
Normal file
Binary file not shown.
9
1/ProgIf.java
Normal file
9
1/ProgIf.java
Normal file
@@ -0,0 +1,9 @@
|
||||
public class ProgIf {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 2000000; // Variable guthaben deklarieren
|
||||
System.out.println("Guthaben = " + guthaben);
|
||||
if ( guthaben >= 1000000 ) { // wenn guthaben mehr als 1000000
|
||||
System.out.println("Gratuliere, Du bist Millionaer!"); // dann schreiben
|
||||
}
|
||||
}
|
||||
}
|
||||
9
1/ProgIf.~ava
Normal file
9
1/ProgIf.~ava
Normal file
@@ -0,0 +1,9 @@
|
||||
public class ProgIf {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 2000000; // Variable guthaben deklarieren
|
||||
System.out.println("Guthaben = " + guthaben);
|
||||
if ( guthaben >= 1000000 ) {
|
||||
System.out.println("Gratuliere, Du bist Millionaer!");
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
1/ProgWhile.class
Normal file
BIN
1/ProgWhile.class
Normal file
Binary file not shown.
14
1/ProgWhile.java
Normal file
14
1/ProgWhile.java
Normal file
@@ -0,0 +1,14 @@
|
||||
public class ProgWhile {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000;
|
||||
int sparziel = 8000;
|
||||
int einzahlung = 600; // variables deklaration
|
||||
System.out.println ("Guthaben = " + guthaben);
|
||||
System.out.println ("Sparziel = " + sparziel); // schreiben
|
||||
while ( guthaben < sparziel ) { // while-schleife , ausführt sich bis guthaben > sparziel
|
||||
guthaben += einzahlung; // math-oper, guthaben + einzahlung
|
||||
System.out.println ("neues Guthaben = " + guthaben);
|
||||
}
|
||||
System.out.println( "Sparziel erreicht.");
|
||||
}
|
||||
}
|
||||
14
1/ProgWhile.~ava
Normal file
14
1/ProgWhile.~ava
Normal file
@@ -0,0 +1,14 @@
|
||||
public class ProgWhile {
|
||||
public static void main (String args[]) {
|
||||
int guthaben = 1000;
|
||||
int sparziel = 8000;
|
||||
int einzahlung = 600; // variables deklaration
|
||||
System.out.println ("Guthaben = " + guthaben);
|
||||
System.out.println ("Sparziel = " + sparziel); // schreiben
|
||||
while ( guthaben < sparziel ) { // while-schleife , ausführt sich bis guthaben > sparziel
|
||||
guthaben = guthaben + einzahlung;
|
||||
System.out.println ("neues Guthaben = " + guthaben);
|
||||
}
|
||||
System.out.println( "Sparziel erreicht.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user