为了账号安全,请及时绑定邮箱和手机立即绑定

为什么1<=i<=100,有前面的<=就提交不了了啊,求解答,谢谢

#include <stdio.h>

int main()

{

    int i,sum=0;

    i=1;

    while(   1<=i<=100  )  //循环条件应该是什么呢?

    {

        sum=sum+i;

         i++;         //这里是不是应该改变循环变量的值

    }

    printf("100以内所有整数之和为:%d\n", sum);

    return 0;

}


正在回答

2 回答

这里要用1<=i&&i<=100

0 回复 有任何疑惑可以回复我~
#1

qq_慕九州4327935 提问者

对哦,谢谢!
2021-10-23 回复 有任何疑惑可以回复我~


http://physics.scu.edu.cn/search ... D%A5%32%2E%38%79%69
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%62%6C
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6D
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%75%65%6E
http://physics.scu.edu.cn/search ... 5%32%2E%38%70%72%6B
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%7A%69%6C
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%72
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%65%6B
http://physics.scu.edu.cn/search ... 5%32%2E%38%7A%67%7A
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%66
http://physics.scu.edu.cn/search ... 5%32%2E%38%6A%63%75
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%65
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%61
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%7A%74%6A
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%6D%77
http://www.ie.sjtu.edu.cn/?s=%E9 ... 5%32%2E%38%6C%75%6E
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%6B%72
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%68%7A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%78%77%6E
http://physics.scu.edu.cn/search ... 5%32%2E%38%7A%78%66
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%AD%A5%32%2E%38%74
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%74%6F
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%67
http://physics.scu.edu.cn/search ... 5%32%2E%38%63%6E%6A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%66%62%69
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%71%78
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%71
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%62
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%71%63
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%74%69%66
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%69%64
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%6C%76
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%7A%72
http://www.ie.sjtu.edu.cn/?s=%E8 ... 6%AD%A5%32%2E%38%73
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%71
http://physics.scu.edu.cn/search ... 5%32%2E%38%67%66%66
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%68
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%73
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%62
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6F%6C%6F
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%7A%6C%71
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%61%6C
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%7A
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%7A%6B%6F
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%65%67%69
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%70
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%79%64%76
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%74%75
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%75%79
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%67
http://physics.scu.edu.cn/search ... 5%32%2E%38%67%73%69
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%61
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%62
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6C
http://physics.scu.edu.cn/search ... 5%32%2E%38%69%67%62
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%62%6A%67
http://physics.scu.edu.cn/search ... 5%32%2E%38%6F%79%64
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%64%62
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%71
http://physics.scu.edu.cn/search ... 5%32%2E%38%71%7A%64
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%62
http://physics.scu.edu.cn/search ... 5%32%2E%38%61%6B%75
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%70
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%61
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%6C%68
http://physics.scu.edu.cn/search ... 5%32%2E%38%72%6E%72
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%77
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%71%61
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%79%6E%61
http://physics.scu.edu.cn/search ... 5%32%2E%38%66%61%72
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%7A
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%68%61
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6F%6C%69
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6F
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6B%6C%79
http://physics.scu.edu.cn/search ... 5%32%2E%38%6F%6C%72
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%61
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%65
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%79%73
http://physics.scu.edu.cn/search ... 5%32%2E%38%75%73%75
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%63%71%67
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%61%64
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%62
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%75%6D%65
http://physics.scu.edu.cn/search ... 5%32%2E%38%6A%66%77
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%61%75
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%70%6A
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%AD%A5%32%2E%38%6C
http://physics.scu.edu.cn/search ... 5%32%2E%38%6E%75%6C
http://www.ie.sjtu.edu.cn/?s=%E8 ... D%A5%32%2E%38%75%7A
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6F
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%6E%6C
http://physics.scu.edu.cn/search ... 5%32%2E%38%79%7A%74
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%7A%69
http://physics.scu.edu.cn/search ... 5%32%2E%38%78%67%6E
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%AD%A5%32%2E%38%66
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6D%72%69
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%7A%64
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6D
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%77
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%73%79
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%69%75
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6D
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%67%7A%68
http://physics.scu.edu.cn/search ... 5%32%2E%38%73%70%68
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%63
http://physics.scu.edu.cn/search ... 5%32%2E%38%74%64%69
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%78
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%78%68
http://www.ie.sjtu.edu.cn/?s=%E7 ... 5%32%2E%38%6D%68%6B
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%6E%6D%71
http://physics.scu.edu.cn/search ... 5%32%2E%38%78%79%67
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%6B%77
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%74%70%78
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%7A%62%76
http://physics.scu.edu.cn/search ... 5%32%2E%38%75%64%68
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%62
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%6A%65
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%63%6F%78
http://www.ie.sjtu.edu.cn/?s=%E4 ... D%A5%32%2E%38%6E%6B
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6C
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%75%69%63
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%67
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%6E%76
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%75
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6F
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%79
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6C
http://www.ie.sjtu.edu.cn/?s=%E9 ... 5%32%2E%38%63%79%71
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%79%66
http://www.ie.sjtu.edu.cn/?s=%E8 ... 6%AD%A5%32%2E%38%6F
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%68%66
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6B%68%70
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%70
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%AD%A5%32%2E%38%61
http://physics.scu.edu.cn/search ... 5%32%2E%38%78%79%66
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%6E%74%6A
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%76%66
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%71%6C
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%75
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%6C%63%75
http://physics.scu.edu.cn/search ... 5%32%2E%38%77%73%79
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%78
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6B
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%67%77%77
http://physics.scu.edu.cn/search ... 5%32%2E%38%76%66%61
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%78%74%6C
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%6F%6B
http://www.ie.sjtu.edu.cn/?s=%E4 ... 6%AD%A5%32%2E%38%70
http://physics.scu.edu.cn/search ... 5%32%2E%38%78%6E%76
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%69%6A
http://physics.scu.edu.cn/search ... 5%32%2E%38%71%66%79
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%64
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%79%68
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%72
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%73%79%70
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%78%79
http://www.ie.sjtu.edu.cn/?s=%E6 ... 5%32%2E%38%77%68%74
http://www.ie.sjtu.edu.cn/?s=%E6 ... D%A5%32%2E%38%79%64
http://www.ie.sjtu.edu.cn/?s=%E5 ... 5%32%2E%38%72%70%67
http://www.ie.sjtu.edu.cn/?s=%E4 ... 5%32%2E%38%74%74%6C
http://physics.scu.edu.cn/search ... 5%32%2E%38%75%6E%65
http://www.ie.sjtu.edu.cn/?s=%E5 ... D%A5%32%2E%38%6D%7A
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6C
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%73
http://physics.scu.edu.cn/search ... 6%AD%A5%32%2E%38%6A
http://www.ie.sjtu.edu.cn/?s=%E6 ... 6%AD%A5%32%2E%38%6D
http://physics.scu.edu.cn/search ... 5%32%2E%38%6A%64%75
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%71
http://physics.scu.edu.cn/search ... D%A5%32%2E%38%68%7A
http://www.ie.sjtu.edu.cn/?s=%E5 ... 6%AD%A5%32%2E%38%6A

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么1<=i<=100,有前面的<=就提交不了了啊,求解答,谢谢

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信