Current location - Health Preservation Learning Network - Slimming men and women - Computer c language
Computer c language
When 1. i=3,I >; = 1 hold.

(1) j= 1, j < = 2 holds, so the output i+j=4.

(2) after j increases (j++), j = 2 and j < =2 holds, so i+j=5 is output.

(3) after increasing j, j = 3, j.

2. after I reduction, I = 2, I >;; = 1 hold.

( 1)j= 1,i+j=3

(2)j = 2; i+j=4

(3)j=3 is not valid.

3. after I reduction, I = 1, I >;; = 1 hold.

( 1) j= 1,I+j = 2;

(2)j = 2; I+j = 3;

(3)j=3 is not valid.

4. after I reduction, I = 0, I >;; = 1 is invalid, and the loop ends.