|
|
@@ -1,14 +1,26 @@ |
|
|
|
package praktikum01; |
|
|
|
|
|
|
|
public class Zahlenfilter { |
|
|
|
int length = 200; |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
Zahlenfilter zahlenfilter = new Zahlenfilter(); |
|
|
|
zahlenfilter.checknumber(); |
|
|
|
|
|
|
|
|
|
|
|
if(args.length >0){ |
|
|
|
try{ |
|
|
|
zahlenfilter.length = Integer.parseInt(args[0]); |
|
|
|
} |
|
|
|
catch (NumberFormatException e){ |
|
|
|
System.out.println("Das geht nicht. Default: 200"); |
|
|
|
} |
|
|
|
} |
|
|
|
zahlenfilter.checknumber(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void checknumber(){ |
|
|
|
for (int i = 1; i <= 200; i++) { |
|
|
|
for (int i = 1; i <= length; i++) { |
|
|
|
checkDurch5(i); |
|
|
|
checkEndet9(i); |
|
|
|
if (i > 1) { |