Code
1 protected void Button3_Click(object sender, EventArgs e)
2 {
3 int i=0, j, sum=0;
4 //for方法实现之一
5 //for (i = 0; i < 101; i++)
6 //{
7 // sum += i;
8 //}
9 //其它方法实现之二
10 //while(i<101)
11 //{
12 // sum += i;
13 // i++;
14 //}
15 //其它方法实现之三
16 //do
17 //{
18 // sum += i;
19 // i++;
20 //}
21 //while(i<101);
22 Response.Write(sum);
23 }
Talents come from diligence, and knowledge is gained by accumulation.