CodePudding user response:
First because the sum has been accumulating (the last cycle is the result of the accumulation, so the if (sum==I) always not satisfied, so I didn't printA second before each cycle to achieve I factor, the sum first, so the sum is I factor, so the if (sum==I) may meet, so there may be printing the results
CodePudding user response:
# define _CRT_SECURE_NO_WARNINGS
# include & lt; Stdio. H>
Int main ()
{
For (int I=0; I & lt; 10; I++)
{
Int j=10;
{
Printf (" % d \ n ", j++);
}
}
return 0;
}
Why j has been 10, define runs only once, isn't it? J is not in the block has been have a lifetime?
CodePudding user response: