发布时间:2014-12-19 14:27:08
#include <stdio.h>double pow(double x,int n){ int i; double sum; sum=1; for(i=0;i<n;i++) { sum=sum*x; } return sum;}int main(){ double num; int n; scanf("%lf%d",&num, &n);  .........【阅读全文】
发布时间:2014-12-16 16:40:07
/*从键盘获取一个数num,求所有小于num的质数的个数,请完成下面daima*/#include int is_primer(int num){ int flag=1; int a; for(a=2;a......【阅读全文】
发布时间:2014-12-15 11:58:52
#include <stdio.h>int sum(int n){ int b=1; while(n) { b=b*n; n--; } return b;}int main(){ int n; scanf("%d",&n); printf("%d\n",sum(n) );} 如图:......【阅读全文】