标签:数字 iostream bsp stream nbsp return while pre sum
#include <iostream> int main() { int sum = 0, val = 0; while (std::cin >> val) { sum += val; } std::cout << "所有的数字的和是 -> " << sum << std::endl; return 0; }
标签:数字 iostream bsp stream nbsp return while pre sum
原文地址:http://www.cnblogs.com/funnyweb/p/6213062.html