解题思路:
注意事项:
参考代码:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,s=0;
cin>>n;
for(int i=1;i<=n; i++)
{
s=s+i;
}
cout<<s;
return 0;
}
0.0分
1 人评分
用筛法求之N内的素数。 (C语言代码)浏览:1350 |
C语言考试练习题_排列 (C语言代码)浏览:755 |
【亲和数】 (C语言代码)浏览:538 |
C语言程序设计教程(第三版)课后习题8.1 (C语言代码)浏览:562 |
WU-整除问题 (C++代码)浏览:638 |
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:663 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:638 |
Cylinder (C语言描述,蓝桥杯)浏览:1270 |
1071题解浏览:573 |
字符串比较 (C语言代码)浏览:760 |