hallo
was stimmt den an diesem programm nicht??
static double rechnung (double a,
double h, )
{
double result;
result=half*a*(h*h);
}
public static void main(String[] args)
{
double a;
double h;
double result;
double half=0.5;
System.out.println("Beschleunigung eingeben");
a=ReadDouble();
do{
System.out.println("Bitte Zeit eingeben");
h=ReadDouble();
result=rechnung (a, h);
System.out.println("Das Resultat = "+result);
}while(h!=0);
}
das sind die fehler, die der editor ausgigbt:
funktion1.java:111: illegal start of type
double h, )
^
funktion1.java:111: ')' expected
double h, )
^
funktion1.java:112: ';' expected
{
^
funktion1.java:113: <identifier> expected
double result;
^
funktion1.java:115: <identifier> expected
result=half*a*(h*h);
^
funktion1.java:121: class, interface, or enum expected
public static void main(String[] args)
^
funktion1.java:125: class, interface, or enum expected
double h;
^
funktion1.java:126: class, interface, or enum expected
double result;
^
funktion1.java:127: class, interface, or enum expected
double half=0.5;
^
funktion1.java:129: class, interface, or enum expected
System.out.println("Beschleunigung eingeben");
^
funktion1.java:130: class, interface, or enum expected
a=ReadDouble();
^
funktion1.java:133: class, interface, or enum expected
do{
^
funktion1.java:135: class, interface, or enum expected
h=ReadDouble();
^
funktion1.java:137: class, interface, or enum expected
result=rechnung (a, h);
^
funktion1.java:139: class, interface, or enum expected
System.out.println("Das Resultat = "+result);
^
funktion1.java:141: class, interface, or enum expected
}while(h!=0);
^
funktion1.java:144: class, interface, or enum expected
}
^
17 errors
danke