Java:
public class pi {
public static double main(double pi, double i, double temp, double speicher) {
while(i<1000){
speicher=temp+speicher;
temp= 1/i*i;
i=i+1;
temp=temp+speicher;
}
pi=Math.sqrt(temp*6);
return pi;
}
}
wenn ich diesen code ausführen lassen will, kommt die fehlermeldung:
Fehler: Hauptmethode in Klasse pi nicht gefunden. Definieren Sie die Hauptmethode als:
public static void main(String[] args)
ich versteh nicht ganz wie das gemeint ist, mache noch nicht solange etwas mit java...