6.4
来源:互联网 发布:川农网络教育 编辑:程序博客网 时间:2024/06/07 16:00
#include<stdio.h>int main(){ int a,n,f2; long f3; scanf("%d",&n); for(a=1;a<=n;a++) { a=a*a; f2+=a; } for(a=1;a<=n;a++) { a=a*a*a; f2+=a; } printf("平方和=%d\n",f2); printf("立方和=%ld\n",f3); return 0;}
测试结果:
可以 用第七章的 就是 不是很熟练
阅读全文
0 0
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 6.4
- 指针相关问题
- 输出一个平行四边形
- Oracle:SQL优化
- React.js 中的 const
- maven项目启动报错:Non-resolvable parent POM for com.taotao:Taotao-common:0.0.1-SNAPSHOT: Could not find ar
- 6.4
- ViewPager预加载及其优化
- 5.7
- 并发Map映射ConcurrentMap
- 5.1
- IE10/IE11兼容视图设置
- 6.3
- MVP okhttp+springview+RecyclerView 上拉下拉功能+多条目加载
- Windows CE的电源管理之三