首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算: y1=(x+8)2-2(x+8)+6 y2=sin2(x)-2sin(x)+6 请填空。 #include "math.h" double fun(double x
以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算: y1=(x+8)2-2(x+8)+6 y2=sin2(x)-2sin(x)+6 请填空。 #include "math.h" double fun(double x
admin
2010-12-10
47
问题
以下程序中,函数fun的功能是计算x2-2x+6,主函数中将调用fun函数计算:
y1=(x+8)2-2(x+8)+6
y2=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("%lf",&x);
y1=fun(【 】);y2=fun(【 】);
printf("y1=%lf,y2=%lf\n",y1,y2);
}
选项
答案
x+8 , sin(x)
解析
用x+8代替函数fun( double x)中形式参数x。用sin(x)代替函数fun( double x)中形式参数x。
转载请注明原文地址:https://jikaoti.com/ti/6yB0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
已知a=6,b=15,c=23,则语句PrintSgn(a+bMod6-c\a)&a+b的输出结果为( )。
下面不是键盘事件的是( )。
在程序中要使用Array函数给数组arr赋初值,则以下数组变鞋定义语句中错误的是()。
在菜单编辑器中建立如下图所示的菜单,并为每个菜单项编写了鼠标单击事件过程。关于此菜单,以下叙述中错误的是()。
在程序中要使用Array函数给数组arr赋初值,则以下数组变量定义语句中错误的是( )。
下列叙述中错误的是()。
一个栈的初始状态为空。现将元素1、2、3、4、5、A、B、C、D、E依次入栈,然后再依次出栈,则元素出栈的顺序是( )。
如果把程序的启动对象设置为:SubMain,则SubMain过程
某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是()。
随机试题
敏感器、检测器和测量传感器的区别是什么?
三相半波可控整流电路分为半控和全控两类。()
煤矿安全检查时要严格按照()、安全管理制度进行检查。
投标人被没收投标保证金的情况有()。
公司信贷中,初次面谈的提纲应包括()。
网络文学的出现________了文学要以“书”的形式存在的历史,网络成为文学的载体,文学的传播方式由静态转变为动态,文字的黑白意境被________的光电幻境所取代。如同从原始岩画、陶器到青铜,从竹木简到帛和纸,文学又一次迎来了载体形式的变化,这是文学最典
根据以下资料,回答下列问题。2010年,全社会固定资产投资278140亿元,同比增长23.8%,比上年回落6.2个百分点。其中,城镇固定资产投资完成241415亿元,同比增长24.5%,比上年回落5.9个百分点。在城镇固定资产投资中,全年工业完成投资额9
一列高铁火车长380米,另有一列普通火车长580米,两车速度比为5:3,已知两车同向行驶交叉时间为1分钟,当它们相向而行时,两车交叉的时间是多少秒?
与“欲穷千里目,更上一层楼”有异曲同工之妙的诗句是()。
TheMid-summerDay.ahundred-year-oldtraditioninScandinavia,fallsonJune22ndor23rd,whenthesunwillreachitshighest
最新回复
(
0
)