下列程序的输出结果是( ) int f1(int x,int y){returnx>y?x ∶ y;} int f2(int x,int y){returnx>y?y ∶ x;} main( ) { int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d)); f=f1(f2(a,b),f2(c,d)); g=a+b+c+d-e-f; printf("%d,%d,%d\n",e,f,g); }
举一反三
- 有以下程序 int f1(int x,int y) {return x>y?x:y;} int f2(int x,int y) {return x>y?y:x;} main() { int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d)); f=f1(f2(a,b),f2(c,d)); g=a+b+c+d-e-f; printf("%d,%d%d\n",e,f,g); } 程序运行后的输出结果是()
- 下列程序的输出结果是()intf1(intx,inty){returnx>y?x∶y;}intf2(intx,inty){returnx>y?y∶x;}main(){inta=4,b=3,c=5,d=2,e,f,g;e=f2(f1(a,b),f1(c,d));f=f1(f2(a,b),f2(c,d));g=a+b+c+d-e-f;printf("%d,%d,%d\n",e,f,g);}
- 以下是引用片段: int fl(int x,int y) { return x>y?x:y; } int f2(int x,int y) { return x>y?y:x; } main() { int a=4,b=3,c=5,d,e,f; d=f1(a,b); d=f1(d,c); e=f2(a,b); e=f2(e,c); f=a+b+c-d-e; printf("%d,%d,%d\n",d,f,e); } 执行后输出结果是
- 有以下程序int f1(int x, int y){ return x>y?x:y; }int f2(int x, int y){ return x>y?y:x;}main(){ int a=4,b=3,c=5,d, e, f;d=f1(a,b);d=f1(d,c);e=f2(a,b);e=f2(e,c);f=a+b-d-e;printf("%d,%d,%d,",d,f,e);}执行后输出结果是 A: 3,4,5, B: 5,3,4, C: 5,4,3, D: 5,-1,3,
- 下列程序的输出结果是( ) void f(int v,int w) { int t; t=v;v=w;w=t; } int main() { int x=1,y=3;z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf(“%d,%d,%d\n”,x,y,z); }