单选题阅读下列程序 INTEGER F F(X,Y)=X+Y A=-2.5 B=2.1 B=B+F(A,B) WRITE(*,’(F3.1)’)B END 程序运行的结果是()A 1B 7C 2.1D 1.7
单选题
阅读下列程序 INTEGER F F(X,Y)=X+Y A=-2.5 B=2.1 B=B+F(A,B) WRITE(*,’(F3.1)’)B END 程序运行的结果是()
A
1
B
7
C
2.1
D
1.7
参考解析
解析:
暂无解析
相关考题:
阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x; y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是______。A.10 5B.20 5C.20 40D.10 40
在窗体上画1个命令按钮,名称为Command1,然后编写如下程序: Dim Flag As Boolean Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(“请输入:”) If Flag Then Print f(intNum) End If End Sub Function f(X as Integer)As Integer If X<10 Then Y=X Else Y=X+10 End If f=Y End Function Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=True End Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为______。A.0B.5C.15D.无任何输出
(27)窗体上有两个文本框Text1、Text2以及一个命令按钮Commandl,编写下列程序: Dim y As Integer Private Sub Command1_Click() Dim x As Integer x=2 Text1Text=p2(p1(x),y) Text2Text=p1(x) End Sub Private Function pl(x As Integer) As Integer x=x+y:y=x+y pl=x+y End Function Private Function p2(x As Integer,By Val y As Integer) p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为 A.2 4 2 4 B.2 44 8C.4 4 8 8 D.10 1058 58
(30)窗体上有两个文本框Text1、Text2以及一个命令按钮Commandl,编写下列程序: Dim y As Integer Private Sub Commandl_Click() Dim x As Integerx=2 Text1.Text=p2(pl(x),y) Text2.Text=p2(x) End Sub Private Function p2(x As Integer,y As Integer) x=x+y:y=x+y pl=x+y End Function Private Function p2(x As Integer,y As Integer)As Integer p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。A.2 4 B.2 4 C.4 4 D.10 10 2 4 4 8 8 8 58 58
有以下程序void f( int y, int *x){ y=y+*x; *X=*X+y; }main(){ int x=2,y=4;f(y,x);printf("%d %d\n",x,y);}执行后输出结果是______。
有以下程序: void f(int y,int *x) { y=y+ *x; *x;=*x+y;} main() { int x=2,y=4; f(y,x); - printf ("%d %d\n",x,y); } 执行后的输出结果是 ______。A.8 4B.8 8C.4 8D.4 2
单击命令按钮时,下列程序段的执行结果为( )。 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a-2:b=4:c=6 Call S1(a,b)Print "a="; a; "b="; b; "c="; c Call S2(a,b)Print "a ="; a; "b="; b; "c="; c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, ByVal y As Integer) Dim e As Integer x=2*x:y=y+2:e=x+y End SubA.a=4 b=6 c=6 a=4 b=6 c=6B.a=8 b=6 c=6 a=8 b=6 c=6C.a=4 b=6 c=6 a=8 b=6 c=6D.a=8 b=6 c=6 a=4 b=6 c=6
以下程序运行时,单击窗体后,在窗体上输出的结果是 ______。 Private SubForm_Click() Dim a As Integer,b As Integer a=10 :b=20 Call ff(a,B)Print a,b End Sub Private Sub ff(x As Integer,y As Integer) x=x+y y=x+y End SubA.30 50B.30 30C.20 20D.10 20
窗体中有命令按钮Commandl,事件过程如下: PublicFunction f(x As Integer)As Integer Dim Y AsInteger X=20 y=2 f= X *Y End Function PrivateSub Commandl_Click( ) Dim y As Integer static x As Integer x=10 y=5 y=f(x) Debug.Print x;y End Sub 运行程序,单击命令按钮,则立即窗口中显示的内容是( )A.10;5B.10;40C.20;5D.20;40
在窗体上画一个名称为Command1的命令按钮,并编写如下程序: Private Sub Command1_Click( ) Dim x As integer Static y As integer x=10 y=5 Call f1(x,y) Print x,y End Sub Private Sub f1(ByRef xl As Integer,y1 As Integer) x1=x1+2 y1=y1+2 End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.10 5B.12 5C.10 7D.12 7
设有Function过程:Private Function f(a As Integer, b As Integer) As Integera = a * a:b = b * bf = CInt(Sqr(a - b))End Function则如下程序段的运行结果是( )。Private Sub Command1_Click()Dim X As Integer, Y As IntegerX = 5: Y = 4a = f(X, Y)Print aEnd SubA. 5B. 4C. 3D. 9
下面程序输出的结果是( )。 include using namespace std; int test(int n1 下面程序输出的结果是( )。 #include<iostream> using namespace std; int test(int n1,int n2) {return n1 +n2;} float test (int f1,float f2){return f1-f2;} float test(float x,float y){return(x+y)/2;} float test(float x,int y){return(x+y)*2;} void main(){ int a1=10; float a2=2.5f; cout<<test(a1,a2); }A.12.5B.7.5C.6.25D.25
窗体上有两个文本框Text1、Text2以及一个命令按钮Comanand1,编写下列程序: Dim y As Integer Private Sub Command1_Click() Dim x As Integer x=2 Text1.Text = p2(p1(x), y) Text2.Text = p1(x) End Sub Private Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+y End Function Private Function p2(x As Integer, y As Integer) As Integer p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。A.2 4 2 4B.2 4 4 8C.4 4 8 8D.10 10 58 58
下列( )项是在D={(x,y)|x2+y2≤1,x≥0,y≥0)上的连续函数f(x,y),且f(x,y)=3(x+y)+16xy。A.f(x,y)=3(x+y)+32xyB.f(x,y)=3(x+y)-32xyC.f(x,y)=3(x+y)-16xyD.f(x,y)=3(x+y)+16xy
有程序:INTEGERFF(X,Y)=X/Y+XA=-2.0B=4.0B=B+F(A,B)WRITE(*,20)B20FORMAT(1X,F4.1)END此程序的运行结果是:()A、1.0B、1.5C、2.0D、3.0
单选题以下程序的功能是:通过调用calc函数,把所求得的两数之和值放入变量add中,并在主函数中输出。#includevoidcalc(floatx,floaty,float*sum){ ______=x+y;}main(){ floatx,y,add; scanf(%f%f,x,y); calc(x,y,add); printf(x+y=%f,add);}calc函数中下划线处应填入的是( )。A*sumBsumCsumDadd
单选题若函数u=xy·f[(x+y)/xy],f(t)为可微函数,且满足x2∂u/∂x-y2∂u/∂y=G(x,y)u,则G(x,y)必等于( )。Ax+yBx-yCx2-y2D(x+y)2
单选题有程序:INTEGERFF(X,Y)=X/Y+XA=-2.0B=4.0B=B+F(A,B)WRITE(*,20)B20FORMAT(1X,F4.1)END此程序的运行结果是:()A1.0B1.5C2.0D3.0