Browse Source

Korrektur

master
Peter Kessler 2 months ago
parent
commit
e392637a13
1 changed files with 14 additions and 2 deletions
  1. 14
    2
      Zahlenfilter.java

+ 14
- 2
Zahlenfilter.java View File

@@ -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) {

Loading…
Cancel
Save