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