Home > database >  The C language
The C language

Time:10-21

Why I=1.0/I placed in a for loop will execute not?

CodePudding user response:

You won't know until you provide the code out to see

CodePudding user response:

reference 1st floor SuperDay response:
what do you want to provide the code to see if just know

#include

Int main ()
{
int n,i;
Double sum=0;
for(i=1; i<=n; I++)
{
I=1.0/I;
The sum +=I;
}
Printf (" % f ", sum);
return 0;
}

CodePudding user response:

I is a control loop, so you don't in the loop to modify its value:
The sum +=(1.0/I);
Such written
  • Related