Home > Back-end >  When calculating length is 1 to 20 the perimeter of the square, until the circumference greater than
When calculating length is 1 to 20 the perimeter of the square, until the circumference greater than

Time:12-23

/* calculation length is 1 to 20 of the perimeter of the square, until circumference greater than 50 */
#include
Int main ()
{
C, int I;
for(i=1; I<=20; I++)
{
C=4 * I;
If (c<=50)
Printf (" % d \ n ", c);
}
return 0;
}
Question: if the for the inside of the if statement written for outside the result is what? Why
Lose not to come out?

CodePudding user response:

Bosses save the children

CodePudding user response:

If if statements written in a for loop, outside finish for loop execution, c=4 * 20=80; At this moment c<=50 was not, of course, there is no output

CodePudding user response:

Won't write output, c=80 outside

CodePudding user response:

Won't output, will only in the outside circulation
  • Related