#includeint main(){int i=1; //当前要加的值int result=0; //结果for(i=1;i<=100;i++) /*for循环,每次把当前的i加到结果上,然后增加i的值,直到100。*/ result+=i;printf("%d",result)}
Dim a,i as Integera=0For i= 1 to 100 a=a+iNextMsgBox"a"