Exercise 5.2

来源:互联网 发布:私教排课软件 编辑:程序博客网 时间:2024/06/05 02:42
#include<iostream>int main(){    using namespace std;    int m;    int n = 0;    cout << "请输入一个整数(0结束):";    while(cin >> m && m != 0){        n += m;        cout << "目前为止,所有输入整数的和为:" << n << endl;        cout << "请输入一个整数(0结束):";    }    cout << endl;    return 0;}

原创粉丝点击