F
ferrum
Gast
Hallo könnte mir jemand sagen was das programm genau macht?
bin leider in java überhaupt nocht firm will das aber ändern.
Was genau berechnet dieses Programm eigentlich?
Ich weis z.b. nicht wozu die einzelnen variablen dienen... insbesondere die der methode e (f, g, h)
Welche werte sind diesen Variablen zugewiesen?
Brauche dringend Hilfe...
Danke im Voraus...
mfg ferrum
bin leider in java überhaupt nocht firm will das aber ändern.
Code:
class a {
static final int b=6;
static final int c=2;
static final int d[]= { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, };
static int e(int f, int g, int h) {
int j, k;
j=b;
// ##
j=(j+ ((365 % 7)*h)) % 7;
// ##
j=(j+ (h / 4)-(h/100)+(h/400)) % 7;
// ##
k=0;
if (g > c) if ((h % 4)==0) if (((h % 100)!=0) || ((h % 400)==0)) k=1; j= (j + (d[g-1] + k + f-1)) % 7;
// ##
return j;
}
};
Ich weis z.b. nicht wozu die einzelnen variablen dienen... insbesondere die der methode e (f, g, h)
Welche werte sind diesen Variablen zugewiesen?
Brauche dringend Hilfe...
Danke im Voraus...
mfg ferrum