网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

1)#include< iostream >

2)#include< cmath >

3)using namespace std;

4)double max(double x,doubley)

5){

6)if(x>y)

7)return x;

8)else

9)return y;

10)}

11)int main()

12){

13)doublea,b,c;

14)cout<<" input two numbers:\n";

15)cin >>a >>b;

16)c=max(a,b);

17)cout<<" the squart of max imum="<< sqrt( c );

18)}

第13行中变量a、b、c的类型是:()

A.整型

B.单精度浮点型

C.双精度浮点型

D.字符型


参考答案

更多 “ 1)#include2)#include3)using namespace std;4)double max(double x,doubley)5){6)if(x>y)7)return x;8)else9)return y;10)}11)int main()12){13)doublea,b,c;14)cout15)cin >>a >>b;16)c=max(a,b);17)cout18)}第13行中变量a、b、c的类型是:()A.整型B.单精度浮点型C.双精度浮点型D.字符型 ” 相关考题
考题 有以下程序 include int i=0; void fun( ) { { static int i=1 有以下程序 #include<iostream> int i=0; void fun( ) { { static int i=1; Std::cout<<i++<<','; } Std::cout<<i<<','; } int main( ) { fun();fun(); return O; } 程序执行后的输出结果是A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,

考题 有以下程序includeint i=0;void fun(){{ Static int i=1 Std::cont 有以下程序 #include<iostream,h> int i=0; void fun() { { Static int i=1 Std::cont<<i++<<','; } Std::cout<<i<<','; } int main() { fun();fun(); return 0; } 程序执行后的输出结果是( )。A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,

考题 有以下程序: include int i=0;void fun(){{static iht i=1; std::cout 有以下程序: # include <iostream> int i=0; void fun() {{static iht i=1; std::cout<<i++<<','; } std:: cout<<i<<','; } int main() { fun(); fun(); return 0; }程序执行后的输出结果是______。A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,

考题 下面程序编译时发现ma[3]=9错误,其原因是______。 include class FunArray { int*pa; 下面程序编译时发现ma[3]=9错误,其原因是______。include<iostream.h>class FunArray{int*pa; //指向一个数组空问int size; //数组元素个数public:FunArray(int a[],int thesize):pa(a),size(thesize){}int Size( ){return size;}}};void main( ){int s[]={3,7,2,1,5,4};FunArray ma(s,sizeof(s)/sizeof(int));ma[3]=9;cout<<ma[3]<<endl;}

考题 有以下程序:includeincludeusing namespace std; class point{private:double 有以下程序: #include<iostream> #include<math> using namespace std; class point { private: double x; double y; public: point(double a,double B) { x=a; y=b; } friend double distance (point a,point B) ;A.1B.5C.4D.6

考题 有以下程序: include include using namespace std; int main() {char arr[ 有以下程序: #include<iostream> #include<string> using namespace std; int main() { char arr[2][4]; strcpy(arr[0],"you"); strcpy(arr[1],"me"); arr[0][3]=''; cout<<arr[0]<<end1; return 0; } 执行后的输出结果是( )。A.youmeB.youC.meD.err

考题 有以下程序include int i = 0;void fun( ){ {static int i = 1;std::cout 有以下程序 #include <iostream> int i = 0; void fun( ) { { static int i = 1; std::cout<<i++<<','; } std::cout<<i<<','; } int main() { fun(); fun(); return 0; } 程序执行后的输出结果是A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,

考题 如下程序用来计算公式1!+2!+3!+…+10!,请完善程序。 #include <iostream> using namespace std; int main() { int i,j,sum,product; cout<<"1!+2!+3!+.......+10!= "; sum=【1】; for (【2】) { product=【3】; for (【4】) { product*=j; } sum+=product; } cout<<sum<<endl; return 0; }

考题 5、以下程序的输出结果是 。 #include<iostream> using namespace std; void main() { int a[ ][4]={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; cout<<**a<<'\t'; cout<<*(a[1]+2)<<'\t'<<*(*(a+2)+2)<<'\n'; }

考题 下面代码是否正确?// 以C++17标准编译 #include <iostream> int main() { if (int x {10}; x-- > 0) { x--; } std::cout << x; return 0; }