while求和(1到100)

    var total = 0;
    var i = 1;
    while(i < 101){
        total += i;
        i++;
    }
    console.log(total)

  

posted @ 2020-01-06 14:20  笨鸟使劲飞  阅读(1513)  评论(0编辑  收藏  举报