public class Mathe {
public static String ausgabeVielfache(int a, int n) {
int b = 1;
for (b = 1; b <= n; b = b + 1) {
System.out.println(a * b + " ");
}
return "Nächste Zahl";
}
public static String ausgabe1x1(int n, int a) {
int b = 1;
a = 1;
while (a <= n) {
for (b = 1; b <= n; b++) {
return a * b + " ";
}
System.out.println();
}
return "Nächste Zahl";
}
public static void main(String[] args) {
int a = 3, n = 5;
ausgabeVielfache(a, n);
System.out.println("Ende vielfache");
ausgabe1x1(n, a);
}
}
Fehlanzeige==>
TestSuite.java:47: error: method ausgabe1x1 in class Mathe cannot be applied to given types;
Mathe.ausgabe1x1(5);
^
required: int,int
found: int
reason: actual and formal argument lists differ in length
TestSuite.java:54: error: method ausgabe1x1 in class Mathe cannot be applied to given types;
Mathe.ausgabe1x1(1);
^
required: int,int
found: int
reason: actual and formal argument lists differ in length
TestSuite.java:61: error: method ausgabe1x1 in class Mathe cannot be applied to given types;
Mathe.ausgabe1x1(3);
^
required: int,int
found: int
reason: actual and formal argument lists differ in length
3 errors
1
Files
Code: