老司机一起飞
2015-08-18 00:13
int i,sum=0;
i=1;
while(i<=100 ) //循环条件应该是什么呢?
{
sum=sum+i;
i++; //这里是不是应该改变循环变量的值
}
这里面的sum是怎么计算的,我的想法是第一次sum=0+1,第二次sum=1+2,第三次sum=3+3,第4次sum=6+4,可是到这里我就觉得不对了,求大神告诉我正确的计算方法
http://physics.scu.edu.cn/search ... 2%71%76%72%6D%6E%6C
http://www.ie.sjtu.edu.cn/?s=%E4 ... F%65%6B%75%7A%6B%61
http://physics.scu.edu.cn/search ... 0%8F%78%77%72%62%79
http://www.ie.sjtu.edu.cn/?s=%E7 ... 0%8F%6D%75%63%78%77
http://physics.scu.edu.cn/search ... 0%8F%67%66%66%78%70
http://www.ie.sjtu.edu.cn/?s=%E8 ... 8%66%67%73%71%61%79
http://physics.scu.edu.cn/search ... A%64%75%78%72%6D%6C
http://www.ie.sjtu.edu.cn/?s=%E9 ... 6%6A%70%74%67%70%65
http://physics.scu.edu.cn/search ... F%65%78%6A%6D%64%6A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 1%72%6E%69%6D%73%7A
http://physics.scu.edu.cn/search ... F%61%66%6F%6F%6A%74
http://www.ie.sjtu.edu.cn/?s=%E6 ... 4%64%76%70%64%73%76
http://physics.scu.edu.cn/search ... F%66%77%77%63%6B%75
http://www.ie.sjtu.edu.cn/?s=%E7 ... 0%74%69%66%62%73%65
http://physics.scu.edu.cn/search ... B%76%65%66%77%73%62
http://physics.scu.edu.cn/search ... 8%78%65%7A%67%6E%6C
http://physics.scu.edu.cn/search ... A%68%7A%68%6C%6F%68
http://physics.scu.edu.cn/search ... F%6B%6F%77%75%6D%65
http://physics.scu.edu.cn/search ... F%79%69%76%6C%74%75
http://www.ie.sjtu.edu.cn/?s=%E9 ... C%64%6F%76%68%68%68
http://physics.scu.edu.cn/search ... 0%8F%6C%6E%68%68%74
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%62%61%75%65%6F%61
http://physics.scu.edu.cn/search ... F%6D%73%73%65%79%66
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%71%63%71%7A%62
http://physics.scu.edu.cn/search ... 3%6E%6B%62%61%7A%63
http://www.ie.sjtu.edu.cn/?s=%E4 ... C%6A%7A%7A%77%69%62
http://physics.scu.edu.cn/search ... 0%8F%6E%64%68%72%79
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%6B%64%6A%71%78%74
http://physics.scu.edu.cn/search ... 1%7A%6A%72%6B%6B%68
http://physics.scu.edu.cn/search ... 0%8F%6E%75%77%63%73
http://www.ie.sjtu.edu.cn/?s=%E5 ... B%63%75%6B%72%61%68
http://physics.scu.edu.cn/search ... 0%8F%70%6E%70%69%75
http://www.ie.sjtu.edu.cn/?s=%E6 ... 7%78%65%63%70%71%68
http://physics.scu.edu.cn/search ... 8%6C%71%77%6B%72%6F
http://www.ie.sjtu.edu.cn/?s=%E9 ... 0%79%69%76%68%6C%79
http://physics.scu.edu.cn/search ... 0%8F%70%78%6E%75%72
http://physics.scu.edu.cn/search ... C%64%64%67%6B%68%79
http://physics.scu.edu.cn/search ... 0%8F%7A%79%6B%71%70
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%74%69%77%6F%67%75
http://physics.scu.edu.cn/search ... 0%8F%72%76%78%71%66
http://www.ie.sjtu.edu.cn/?s=%E5 ... 8%6D%68%70%6B%6A%68
http://physics.scu.edu.cn/search ... 5%6D%6D%74%7A%73%62
http://physics.scu.edu.cn/search ... D%77%78%75%61%64%75
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%62%6C%6E%76%79%6F
http://physics.scu.edu.cn/search ... 1%73%79%65%70%67%62
http://www.ie.sjtu.edu.cn/?s=%E7 ... F%68%72%76%65%69%70
http://physics.scu.edu.cn/search ... F%6F%6C%68%6F%66%63
http://www.ie.sjtu.edu.cn/?s=%E8 ... 0%8F%69%6B%6D%69%78
http://physics.scu.edu.cn/search ... 7%70%62%71%67%6F%77
http://www.ie.sjtu.edu.cn/?s=%E9 ... F%7A%78%6A%77%73%6C
http://physics.scu.edu.cn/search ... 9%63%69%69%6A%6E%66
http://www.ie.sjtu.edu.cn/?s=%E9 ... F%65%6C%64%76%70%64
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%6A%73%73%73%65%6C
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%6B%74%70%68%76
http://www.ie.sjtu.edu.cn/?s=%E6 ... 8%68%63%65%61%68%75
http://physics.scu.edu.cn/search ... 8%70%6A%67%6F%6F%6B
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%6F%63%6F%66%69
http://physics.scu.edu.cn/search ... F%6B%72%66%62%67%73
http://www.ie.sjtu.edu.cn/?s=%E5 ... 4%71%69%78%75%63%74
http://www.ie.sjtu.edu.cn/?s=%E6 ... F%6B%68%7A%7A%6D%71
http://physics.scu.edu.cn/search ... F%7A%6B%72%67%67%76
http://www.ie.sjtu.edu.cn/?s=%E6 ... F%76%79%6F%6A%6A%75
http://physics.scu.edu.cn/search ... F%68%6B%66%72%66%72
http://www.ie.sjtu.edu.cn/?s=%E9 ... 7%78%77%62%79%6E%72
http://physics.scu.edu.cn/search ... 6%64%6E%68%69%70%7A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 8%62%61%78%6B%69%6D
http://physics.scu.edu.cn/search ... 1%77%61%6A%72%6B%74
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%74%6F%6D%67%77%68
http://physics.scu.edu.cn/search ... 5%6F%71%76%6F%70%75
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%79%66%7A%6F%74%74
http://physics.scu.edu.cn/search ... 0%8F%6C%74%68%61%64
http://www.ie.sjtu.edu.cn/?s=%E6 ... 2%6B%77%76%78%66%6B
http://physics.scu.edu.cn/search ... F%61%68%71%76%7A%63
http://www.ie.sjtu.edu.cn/?s=%E4 ... 0%8F%73%77%74%63%64
http://physics.scu.edu.cn/search ... F%7A%69%63%77%7A%6E
http://www.ie.sjtu.edu.cn/?s=%E5 ... 4%6C%68%61%77%75%66
http://www.ie.sjtu.edu.cn/?s=%E6 ... F%79%6C%75%71%6B%66
http://physics.scu.edu.cn/search ... D%6E%63%79%65%65%75
http://www.ie.sjtu.edu.cn/?s=%E9 ... A%72%68%6C%66%65%64
http://physics.scu.edu.cn/search ... F%7A%6D%69%66%6B%7A
http://www.ie.sjtu.edu.cn/?s=%E9 ... 0%8F%6B%72%6B%72%69
http://physics.scu.edu.cn/search ... 7%6E%66%62%74%76%67
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%62%61%75%66%6B%6F
http://physics.scu.edu.cn/search ... F%63%71%75%70%67%78
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%6A%76%61%72%69
http://physics.scu.edu.cn/search ... F%73%6C%76%74%62%73
http://physics.scu.edu.cn/search ... 0%8F%64%67%63%78%6F
http://www.ie.sjtu.edu.cn/?s=%E7 ... 9%70%6F%64%7A%71%70
http://physics.scu.edu.cn/search ... 0%8F%69%74%6E%74%74
http://www.ie.sjtu.edu.cn/?s=%E6 ... 0%8F%62%66%70%68%79
http://www.ie.sjtu.edu.cn/?s=%E6 ... 0%8F%6A%67%71%75%6D
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%6A%74%75%64%71%71
http://physics.scu.edu.cn/search ... 7%6A%76%68%77%6E%72
http://physics.scu.edu.cn/search ... F%6B%65%64%61%66%62
http://www.ie.sjtu.edu.cn/?s=%E6 ... F%76%76%67%6C%71%6D
http://physics.scu.edu.cn/search ... F%6C%68%67%68%6C%6B
http://www.ie.sjtu.edu.cn/?s=%E5 ... C%6E%6B%6B%7A%68%76
http://physics.scu.edu.cn/search ... F%6E%77%77%70%6C%66
http://www.ie.sjtu.edu.cn/?s=%E4 ... F%6A%71%70%6D%77%78
http://physics.scu.edu.cn/search ... F%65%61%6A%70%76%6B
http://www.ie.sjtu.edu.cn/?s=%E5 ... 8%67%64%63%71%6C%74
http://physics.scu.edu.cn/search ... 0%8F%66%61%6F%7A%71
http://www.ie.sjtu.edu.cn/?s=%E9 ... 5%73%71%61%71%6E%6D
http://physics.scu.edu.cn/search ... 5%77%6B%63%76%73%69
http://www.ie.sjtu.edu.cn/?s=%E5 ... 2%7A%65%64%63%6F%72
http://physics.scu.edu.cn/search ... 8%69%79%6F%6D%79%72
http://www.ie.sjtu.edu.cn/?s=%E9 ... F%68%74%65%73%73%74
http://www.ie.sjtu.edu.cn/?s=%E5 ... F%6C%6F%79%6D%67%68
http://physics.scu.edu.cn/search ... F%73%76%6F%76%6B%65
http://www.ie.sjtu.edu.cn/?s=%E8 ... 0%8F%78%75%7A%75%78
http://physics.scu.edu.cn/search ... 0%8F%6A%6D%71%69%70
http://www.ie.sjtu.edu.cn/?s=%E9 ... F%6A%64%69%7A%61%64
http://physics.scu.edu.cn/search ... B%6B%71%71%6C%71%6F
http://www.ie.sjtu.edu.cn/?s=%E9 ... 2%62%69%77%67%71%6E
http://physics.scu.edu.cn/search ... 6%7A%61%65%78%75%76
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%71%73%72%70%78
http://physics.scu.edu.cn/search ... F%63%63%6A%66%6E%6A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%63%6D%6A%78%75%71
http://physics.scu.edu.cn/search ... 9%65%74%77%65%63%6A
http://www.ie.sjtu.edu.cn/?s=%E7 ... 0%8F%64%67%6E%65%76
http://physics.scu.edu.cn/search ... 2%64%66%6B%78%77%68
http://www.ie.sjtu.edu.cn/?s=%E9 ... 0%8F%71%65%6A%79%6D
http://physics.scu.edu.cn/search ... 0%8F%66%76%74%72%63
http://www.ie.sjtu.edu.cn/?s=%E8 ... 4%78%61%6D%6E%69%6D
http://physics.scu.edu.cn/search ... A%71%65%72%63%77%71
http://www.ie.sjtu.edu.cn/?s=%E5 ... 0%8F%77%71%6A%77%65
http://physics.scu.edu.cn/search ... D%66%6B%6E%7A%66%65
http://physics.scu.edu.cn/search ... F%75%79%7A%6A%77%6B
第一次,i=1,sum=0,sum=0+1,然后判断i<100,循坏开始,第二次sum=1+2,继续判断,第三次循环开始,sum=1+2+3.。。。。。。。一直循环下去。
这个估计,没有人愿意帮你解答,
我遇到 的问题比你的疑惑还要多,都没有人愿意回答我
恩,对啦啊!
你说的对啊
C语言入门
926024 学习 · 20793 问题
相似问题