Help to see which wrong
CodePudding user response:
Statement, I just see the main function of the return type is void feel not pleasing to the eye, so reply, ha, ha, ha,
# include & lt; Stdio. H>
Int main (void)
{
Int n=1, sum=0;
While (+=n + + (sum) & lt;=3000);
Printf (" % d \ n ", n);
}
CodePudding user response:
Reference:
# include
Void main ()
{
Int I=1, sum=0;
While (sum
=3000){
The sum +=I;
i++;
}
Printf (" 1 + 2 + 3 +... + % d=% d \ n ", - I, sum);
}
CodePudding user response:
Variable (I) has not been initialized
CodePudding user response: