A-A+

有以下程序: #include float tun(int X in

2022-08-06 05:32:14 问答库 阅读 176 次

问题详情

有以下程序: #include<iostream.h> float tun(int X,int Y) {return(X+Y);} void main {int a=2,b=5,c=8; cout$amp;A.编译出错
B.9
C.21
D.9.0请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:B
本题的运算过程是fun((int)fun(a+c,b),a—c),fun((int)fun(10,5),2—8),fun((int)15.000000,一6),thn(15,一6)=9。

考点:程序