I got a very simple problem that I cant figure out.
This is what i want to do :
6 * (1/(1*1) + 1/(2*2) + 1/(3*3) + … + 1/(N*N))
And this is my code attempt, that does not work.
int eingabe = 5;
double c = 0;
for (int i = 1 ; i<=eingabe ;i++) {
c += 1/(i*i);
}
c *= 6;
System.out.println(c);
Please help me guys ! What do I have to do to make the code work?