下列程序的招待结果是【 】。 include float temp;float & fn2(float r){ temp=r*下列程序的招待结果是【 】。include <iostream. h>float temp;float & fn2(float r){temp=r* r* 3.14;return temp;}void main( ){float a=fn2(5.0);float& b=fn2(5.0)b=20;cout<<temp<<end1;}

题目
下列程序的招待结果是【 】。 include float temp;float & fn2(float r){ temp=r*

下列程序的招待结果是【 】。

include <iostream. h>

float temp;

float & fn2(float r)

{

temp=r* r* 3.14;

return temp;

}

void main( )

{

float a=fn2(5.0);

float& b=fn2(5.0)

b=20;

cout<<temp<<end1;

}


相似考题
更多“下列程序的招待结果是【 】。 include <iostream. h>float temp;float &amp; fn2(float r){ temp=r* ”相关问题
  • 第1题:

    写出以下程序的运行结果: int main() { int p,r,n=4,m=7,temp; if(n<m) {temp=n;n=m;m=temp;} p=n*m; while(m!=0) {r=n%m; n=m; m=r; } printf(“%d,%d”,n,p/n); return 0; }


    10

  • 第2题:

    00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)

    A.<class 'int'> <class 'float'> <class 'str'>

    B.<class 'float'> <class 'int'> <class 'str'>

    C.<class 'str'> <class 'float'> <class 'int'>

    D.<class 'str'> <class 'int'> <class 'float'>


    A

  • 第3题:

    使用scanf函数需要在头文件中添加___.

    A.#include <stdio.h>

    B.#include <ctype.h>

    C.#include <float.h>

    D.include <iomanip.h>


    C

  • 第4题:

    8、下列关于float描述错误的是

    A.float:left

    B.float-center

    C.float:right

    D.float:none


    A

  • 第5题:

    下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)

    A.<class 'int'> <class 'float'> <class 'str'>

    B.<class 'float'> <class 'int'> <class 'str'>

    C.<class 'str'> <class 'float'> <class 'int'>

    D.<class 'str'> <class 'int'> <class 'float'>


    C.循环执行1次