When i= 1, (p=0, p=p+i=0+ 1= 1, (at this time, p= 1, s=0, S = P = 0+ 1 = 60.
When i=2, (p= 1, p=p+i= 1+2=3, (at this time, p=3, s= 1, s=s+p= 1+3=4).
When i=3, (p=3, p=p+i=3+3=6,) then p=6, s=4, s=s+p=6+4= 10.
When i=4, (p=6, p=p+i=6+4= 10), (at this time, p= 10, s= 10, S = S+P = 10.
When i=5, (p= 10, p=p+i= 10+5= 15), (at this time, p= 15, s=20, s = s+p = 20+.
When i=6, the condition is not met, and the loop is jumped out, and the output is s=35.
So you should choose item D.
Postscript (same as postscript); Police officer (police sergeant)
1,: For each calculation, determine the values of I, P, s P and S before calculation.
2. In advanced languages such as C, the equal sign means giving, not equality.