geändert am 24.10.2023 um 16:07
This commit is contained in:
parent
07377eefd6
commit
f0e0a9397b
Binary file not shown.
Binary file not shown.
@ -1,10 +1,14 @@
|
|||||||
package Praktikum01;
|
package Praktikum01;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
public class Main extends Zahlenfilter {
|
public class Main extends Zahlenfilter {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Scanner in = new Scanner(System.in);
|
||||||
|
System.out.print("Wie weit soll ich zählen? ");
|
||||||
|
int endC = in.nextInt();
|
||||||
int count = 1;
|
int count = 1;
|
||||||
counter(count);
|
counter(count, endC);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,9 @@ package Praktikum01;
|
|||||||
public class Zahlenfilter {
|
public class Zahlenfilter {
|
||||||
|
|
||||||
|
|
||||||
public static void counter(int c){
|
public static void counter(int c, int endC){
|
||||||
|
|
||||||
for(int i = 0; i < 200; i++){
|
for(int i = 0; i < endC; i++){
|
||||||
int preC = c-1;
|
int preC = c-1;
|
||||||
int ergebnis = c + preC;
|
int ergebnis = c + preC;
|
||||||
int ergebnis2 = preC + c;
|
int ergebnis2 = preC + c;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user