hi help me rewrite the following do loop into a while loop.
int n = 1;
double x = 0;
double s ;
do
{
s = 1.0 / (n * n);
x = x + s;
n++;
}
while (s > 0.01);
is double s given a default value when it was declared?
s is getting smaller and smaller...
hmm, i'm confused!