Browse Source

geändert am 24.10.2023 um 16:07

master
leonmcfly 1 year ago
parent
commit
f0e0a9397b

BIN
out/production/Prog3/Praktikum01/Main.class View File


BIN
out/production/Prog3/Praktikum01/Zahlenfilter.class View File


+ 5
- 1
src/Praktikum01/Main.java View File

@@ -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);
}

}

+ 2
- 2
src/Praktikum01/Zahlenfilter.java View File

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

Loading…
Cancel
Save