标签:amp div eof print main for can nbsp scan
#include <stdio.h> int fun(int); int main(){ int n; while(scanf("%d",&n)!=EOF){ printf("\n%d",fun(n)); } return 0; } int fun(int n){ int sum = 0; for(int i=1;i<=n;i++) sum+=i; return sum; }
标签:amp div eof print main for can nbsp scan
原文地址:http://www.cnblogs.com/CannotInputChinese/p/7903731.html