在以下程序第一行的下划线处填写doublemax,使程序能正确运行。#include
____________(double,double
)voidmain(){doublex,y;scanf('%lf%lf',&x,&y);printf('%lf',max(x,y));}doublemax(doublea,doubleb){return(a>b?a:b);}
____________(double,double
)voidmain(){doublex,y;scanf('%lf%lf',&x,&y);printf('%lf',max(x,y));}doublemax(doublea,doubleb){return(a>b?a:b);}
举一反三
- __________________(double,double);main(){doublex,y;scanf("%lf%lf",&x,&y);printf("%lf",max(x,y));}doublemax(doublea,doubleb){return(a>b?a:b);}
- 有以下程序,请在横线处填写正确语句,使程序可正常编译运行。[br][/br] #include ; main() { double x,y,(*p)(); scanf("%lf%lf",&x,&y); p=avg; printf("%f\n",(*p)(x,y)); } double avg(double a,double b) { return((a+b)/2);}
- 【填空题】141、请在以下程序第一行的下划线处填写适当内容,使程序能正常运行。 ______( double,double); void main() { double x,y; cin>>x>>y; cout< } double max(double a,double b) { return(a>b ? a:b);}
- ) void main() { double x,y; scanf('%lf%lf',
- 有以下程序#include [stdio.h] void sub(double a,double *pb); int main(){ double x,y; scanf("%lf%lf",&x,&y); sub(x,&y); printf("x=%fy=%f\n",x,y); } void sub(double a,double *pb){ a=a-*pb; *pb=*pb-a; }程序运行时输入: 10.2 3.5[回车],则输出结果为( )。 A: x=10.200000 y=-3.200000 B: x=6.700000 y=-13.700000 C: x=7.000000 y=-3.500000 D: x=13.400000 y=-7.000000