Use two methods to write algorithm statements, calculation: 1 + 2 + 3 + +99+100.

Use two methods to write algorithm statements, calculation: 1 + 2 + 3 + +99+100.

Method 1: S = 0I = 1for I = 1 to 100s = S + inext is output by for statement; method 2: S = 0I = 1Do s = S + I & nbsp; & nbsp; is output by do loop statement for S = 0I = 1Do s = S + I & nbsp; & nbsp; I = I + 1loop while I ≤ 100