网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算,请填空。y1=(x+8)2-2(x+8)+6y2=sin2(x)-2sin(x)+6 #include "math.h"double fun(double x){ return();}main(){double x,y1,y2; printf("Enter x:"); scanf("%1f,&x); y1=fun(8+x); y2=fun(); printf("y1=%1f,y2=%1f\n",y1,y2);}


参考答案

更多 “ 以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算,请填空。y1=(x+8)2-2(x+8)+6y2=sin2(x)-2sin(x)+6 #include "math.h"double fun(double x){ return();}main(){double x,y1,y2; printf("Enter x:"); scanf("%1f,x); y1=fun(8+x); y2=fun(); printf("y1=%1f,y2=%1f\n",y1,y2);} ” 相关考题
考题 以下程序中,函数 fun 的功能是计算 x 2-2x+6 ,主函数中将调用 fun 函数计算:y1=(x+8) 2-2 (x+8)+6y2=sin 2(x)-2sin(x)+6请填空。#include "math.h"double fun(double x){ return (x*x-2*x+6); }main(){ double x,y1,y2;printf("Enter x:"); scanf("%lf",x);y1=fun( 【 11 】 );y2=fun( 【 12 】 );printf("y1=%lf,y2=%lf\n",y1,y2);}

考题 设在主函数中有以下定义和函数调用语句,且fun函数为void类型;请写出fun函数的首部【13】。要求形参名为b。main(){double s[10][22];int n; ┆┆fun(s);┆}

考题 设在主函数中有以下定义和函数调用语句,且fun()函数为void类型,请写出fun()函数的首部______。int main(){double s[10][22];int n:...fun (s):...return 0;}

考题 以下程序中,函数fun的功能是计算x2(上标)-2x+6,主函数中将调用fun函数计算:y1=(x+8)2(上标)-2(x+8)+6y2=sin2(上标)(x)-2sin(x)+6请填空。include "math.h"double fun(double x){ return (x*x-2*x+6);}main(){ double x,y1,y2;printf("Enter x:"); scanf("%1f",x);y1=fim([ ]);y2=run([ ]);printf("y1=%1f,y2=%1f\n",y1,y2);}

考题 请编写函数fun(),它的功能是计算:s=(1-In(1)-In(2)-In(3)-…-1n(m))2s作为函数值返回。在C语言中可调用log(n)函数求In(n)。log函数的引用说明是double log(double x)。例如,若m的值为15,则fun()函数值为723.570801。注意:部分源程序给出如下。请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。试题程序:include <conio.h>include <stdio.h>include <math.h>double fun(int m){}main(){clrscr();printf("%f\n",fun(15));}

考题 设在主函数中有以下定义和函数调用语句,且fun函数为void类型。请写出函数fun的头部,要求函数的形参为变量b。main(){ double s[10][22]; int n; …… fun(s); ……}

考题 请编写函数fun,其功能是:找出2×M整型二维数组中最大元素的值,并将此值返回调用函数。 注意:部分源程序在文件PROGl.C中。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。

考题 以下程序的主函数中调用了在其前面定义的fun函数#includestdio.hmain(){ double a[15],k;k=fun(a);...}则以下选项中错误的fun函数首部是A.double fun(double a[15])B.double fun(double *a)C.double fun(double a[])D.double fun(double a)

考题 若主函数中有定义语句:int a[10],b[10],c;,在主函数前定义的fun函数首部为:void fun(int x[ ]),则以下选项中错误的调用语句是( )。 A.fun(b);B.fun(C.fun(D.fun(b[11]);