@@ -1,10 +1,14 @@ | |||
package Praktikum01; | |||
import java.util.Scanner; | |||
public class Main extends Zahlenfilter { | |||
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; | |||
counter(count); | |||
counter(count, endC); | |||
} | |||
} |
@@ -5,9 +5,9 @@ package Praktikum01; | |||
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 ergebnis = c + preC; | |||
int ergebnis2 = preC + c; |