发布时间: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) );} 如图:......【阅读全文】
发布时间:2014-12-15 11:44:49
#include <stdio.h>int main(){ int i,j; int sum; int s; sum=0; for(j=1;j<10;j++) { s = 1; for(i=1; i<=j; i++) { s = s*i; } printf("%d\n",s); sum=sum+s; }&n.........【阅读全文】
发布时间:2014-12-15 11:36:21
#include <stdio.h>int equation(double a,double b,double c) { if(b*b-4*a*c>0) { return 2; } else if(b*b-4*a*c>0) { return .........【阅读全文】
发布时间:2014-12-15 11:00:59
#include <stdio.h>double calculetor(double a,double b, char myoperator){ if(myoperator=='+') { return a+b; } else if(myoperator=='-') { return a-b; } else if(myoperator=='*') { return a*b; } else .........【阅读全文】