Home > Back-end >  Operation error
Operation error

Time:09-24

# include & lt; stdio.h>
Int main ()
{
Int I, s;
i=1;
S=0;
If (i<=100, i++)
S=I + s;
Printf (" sum=% d \ n ", s);
return 0;
}
Calculation results of from one to one hundred, for the calculation result is 2

CodePudding user response:

If (i<=100, i++)
Instead of
for(i=1; I<=100; i++)

CodePudding user response:

for(; I<=100; i++)
  • Related