标签:输出 code lin sum std color lan class log
#include<stdio.h> int main(){ int i; int n; int sum; while(scanf("%d",&n) != EOF){ sum = 0; for(i = 1;i <= n; ++ i){ sum += i; } printf("%d\n\n", sum); } return 0; }
注意: 题中要求的是follow by a blank line 所以在输出的时候需要输出两次\n\n
标签:输出 code lin sum std color lan class log
原文地址:http://www.cnblogs.com/zhuhongjongy/p/6107409.html