Neue Version mit Eingabeparameter
This commit is contained in:
parent
21b02696ac
commit
21c443a99d
@ -3,11 +3,15 @@ package Praktikum01;
|
||||
public class Zahlenfilter {
|
||||
|
||||
public static void main(String[] args){
|
||||
zahlenfilter();
|
||||
int loop = 200;
|
||||
if (args != null || args.length != 0){
|
||||
loop = Integer.parseInt(args[0]);
|
||||
}
|
||||
zahlenfilter(loop);
|
||||
}
|
||||
|
||||
private static void zahlenfilter() {
|
||||
for (int i = 0; i < 200; i++){
|
||||
private static void zahlenfilter(int loop) {
|
||||
for (int i = 0; i < loop; i++){
|
||||
if(i != 0){
|
||||
int j = i -1;
|
||||
if(i%5 == 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user