标签:style blog class code java color
#include<iostream> using namespace std; int main() { int n = 0, sum; while (cin>>n) { sum = 0; // 这里要清零 for (int i =0; i <= n; i++) { sum += i; } cout << sum <<endl <<endl; } return 0; }
标签:style blog class code java color
原文地址:http://www.cnblogs.com/lingc/p/3717919.html