int sum=0;
while(sum!=0);
sum=(1+100)*50;
----------------解决方案--------------------------------------------------------
嗯,有意思…………
[IMG]http://www.pconline.com.cn/diy/other/hq/bj/0611/pic/902491a_2.jpg[/IMG]
----------------解决方案--------------------------------------------------------
有三种方法:
一.
int sum = 0;
for(int i = 1; i <= 100; i++)
sum += i;
二.
int sum = 0,i = 1;
while(1 <= 100){
sum += i;
i++
}
三.
int sum = 0,int i = 1;
do{
sum += i;
i++;
}while(i < 100);
----------------解决方案--------------------------------------------------------