[C++Primer]練習1.16
279 ワード
#include
using std::cin;
using std::cout;
using std::endl;
int main() {
int val = 0, sum = 0;
while (cin >> val) {
sum += val;
cout << "total sum is " << sum << endl;
}
}