38
来源:互联网 发布:mac midi键盘 编辑:程序博客网 时间:2024/04/29 03:50
38.
#include<stdio.h> int powers(int m,int n) {int i,sum=1; for (i=0;i<n;i++){ sum*=m; } return sum; } int sum_of_powers(int k,int n) {int i,sum=0; for(i=1;i<=n;i++) sum+=powers(i,k); return sum; } int main() {int a,b; while(1) {scanf("%d%d",&a,&b); printf("sum of %d powers of intergers from 1 to %d =%d\n",a,b,sum_of_powers(a,b)); } return 0; }
0 0
- 38
- 38
- 38
- 38
- 38
- 38
- 38
- 38
- 38
- 【程序38】
- 38故事
- issue 38
- 练习38
- BC #38
- p123 38
- 三++38
- 123 38
- #job 38
- 硬牌9控牌教程︽◤【在线演示QQ:194714506】
- NYOJ - 中缀式变后缀式(逆波兰式)
- 向空文件写数据,并读取配置文件数据
- 硬牌9控牌方法△╮【在线演示QQ:194714506】
- Android的DatePicker和TimePicker-android学习之旅(三十八)
- 38
- 【Nutch】GeneratorJob
- 硬牌9控牌手法▇〗【在线演示QQ:194714506】
- UML简单介绍(十一)——协作图的概念与实例完全解析
- ModelMap和ModelAndView
- 硬牌9怎么控牌▇▄【在线演示QQ:194714506】
- 引用的本质是什么?
- 硬牌9怎样控牌ζ☉【在线演示QQ:194714506】
- 简单谈一下wordpress中的ajax请求,为什么会一直返回“0”