有以下程序 #include double f (double x); main() { double a=0; int i; for(i=0;i<30;i+=10) a+=f((double)i); printf("%3.0f\n",a); } double f(double x) {return x*x+1;} 程序运行后的输出结果是()
举一反三
- 有以下程序: #include double f(double x);main(){ double a =0;int i; for(i=0;i<30;i+=10) a+=f((double)i); printf("%3.0f\n",a);}double f(double x){ return x*x+1;}程序的运行结果是( ) A: 5050 B: 401 C: 503 D: 1404
- 有以下程序 double f (double x); main() { double a=0; int i; for ( i=0; i<30; i+=10 ) a += f( (double)i ); printf ("%3.0f\n", a); } double f (double x) { return x*x+1; } 程序运行后的输出结果是 A: 503 B: 401 C: 1404 D: 500
- 以下程序执行后的输出为: #include double f1(double x) { return 1.0/x;} double f2(double x) { return x*x;} int main() { int i=3; double (*f[2])(double)={f1,f2}; cout<
- 有以下程序#include <stdio.h>double fun(double a){ double x;x = a - (int)a;return x;}main(){ double a = 3.1415;printf("%f\n", fun(a));}程序的运行结果是______。 A: 0.141500 B: 3.141500 C: 3.000000 D: 0.000000
- 以下函数用以求x的y次方,请填空: double f(double x, double y) { int i; double z=1.0; for(i=1;i ________ ;i++) z=z*x; return z; }