Hallo, habe ein Programm für Wertetabellen von mathematischen Funktionen geschrieben. Leider kann ich das Programm nicht kompilieren, mir wird angezeigt: cannot find symbol, symbol : variable IO1
Wie kann ich IO1 geeignet deklarieren, damit das Programm läuft?
Wie kann ich IO1 geeignet deklarieren, damit das Programm läuft?
Code:
public class AA{
/**
* @param args
*/
public static void main(String[] args) {
String[] Funktionen = { "Berechnung des Logarithmus",
"Berechnung einer trigonometrischen Funktion",
"Berechnung eines Polynoms" };
System.out.println("Dies sind die mathematischen Funktionen");
System.out.println("");
for (int i = 0; i < 3; i++) {
System.out.println(i + "." + Funktionen[i]);
if (i != 2)
continue;
int m, a, N;
int d = 0;
double Ergebnis = 0, x = 0;
do {
System.out.println("");
System.out
.println("Bitte geben Sie die gewünschte Berechnung an.");
m = IO1.einint();
System.out
.println("Bitte geben Sie eine rationale Zahl als Startwert ein.");
a = IO1.einint();
System.out
.println("Bitte geben Sie eine rationale Schrittweite > 0 ein.");
d = IO1.einint();
if (d <= 0)
System.out.println(d + " liegt nicht über Null.");
} while ((d <= 0) && (m >= 0) && (m <= 2));
System.out
.println("Bitte geben Sie eine natürliche Zahl für die anzahl der zu berechnenden x-Werte ein.");
N = IO1.einint();
switch (m) {
case 0:
for (i = a; i <= N; i++) {
x = a + i * d;
Ergebnis = Math.log(x);
System.out.println("x= " + x + " y= " + Ergebnis);
}
break;
case 1:
for (i = a; i <= N; i++) {
x = a + i * d;
Ergebnis = Math.sin(x);
System.out.println("x= " + x + " y= " + Ergebnis);
}
break;
case 2:
for (i = a; i <= N; i++) {
x = a + i * d;
Ergebnis = x * (x * x - x - 12);
System.out.println("x= " + x + " y= " + Ergebnis);
}
break;
default:
System.out.println("Unzulässiger Modus");
break;
}
}
}
}