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

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

下列程序的输出结果是:___________。 x = 10 y = 20 def swap(x, y): t = x x = y y = t print(x, y) swap(x,y) print(x,y)

A.20 10 10 20

B.10 20 10 20

C.10 20 20 10

D.20 10 20 10


参考答案和解析
10 20 10 20
更多 “下列程序的输出结果是:___________。 x = 10 y = 20 def swap(x, y): t = x x = y y = t print(x, y) swap(x,y) print(x,y)A.20 10 10 20B.10 20 10 20C.10 20 20 10D.20 10 20 10” 相关考题
考题 以下程序运行后的输出结果是【】。 include void fun(int x,int y) {x=x+y;y=x-y 以下程序运行后的输出结果是【 】。include<iostream.h>void fun(int x,int y){ x=x+y;y=x-y;x=x-y;cout<< x << "," <<y << " ,";}void main( ){ int x=2,y=3;fun(x,y);cout<< x << "," << y << endl;}

考题 下列程序执行后,屏幕的输出是()。includeusing namespace std;void swap(int x,int y) 下列程序执行后,屏幕的输出是( )。 #include<iostream> using namespace std; void swap(int x,int y) { int temp=x; x=y; y=temp; cout<<"x="<<x<<"",y=""<<y<<end1; } int main() { int x=3,y=2; swap(x,y); cout<<"x="<<x<<",y="<<y<<end1; return 0; }A.x=3,y=2 x=3,y=2B.x=2,y=3 x=3,y=2C.x=2,y=3 x=2,y=3D. x=3,y=2 x=2,y=3

考题 单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 `B.9 5 10 6101051010C.9 6 12D.9 10 10 910155410

考题 以下程序段的输出结果为 ______。 X=1 Y=4 Do Until Y>4 X=X*Y Y=Y+1 Loop Print XA.1B.4C.8D.20

考题 下面程序输出的结果是( )。 include using namespace std; void swap(int 下面程序输出的结果是( )。 #include <iostream> using namespace std; void swap(int a,int b){ int temp; temp=a; a=b; b=temp; } void main(){ int x=2; int y=3; swap(x,y); cout<<x<<y; }A.23B.32C.abD.ba

考题 下列程序段( )能够正确实现条件:如果X<Y则A=15,否则A=-15。A.If X<Y Then A=15 A=-15 Prin AB.If X<Y Then A=15:Print A A=-15:Print AC.If X<Y Then A=1.5:Print A Else A=-15:Print A End IfD.If X<Y Then A=15 Else A=-15 Print A End If

考题 以下程序运行后的输出结果是 。inc]udcmain(){int x=10.y=20.t=0;if(x==y) t=x;x=y;y=1;printf(“%d %d/n”.x,y);

考题 在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Pnvate Sub Command1_Click() Dim x As Integer,y As Integer,t As Integer x=10:y=20:t=0 If x=y Then t=x:x=y:y=t Print x;y End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.10 20B.20 0C.20 10D.20 20

考题 以下程序运行后的输出结果是 ______。 Sub add(x,y) x=x+y Print "x=";x;",y=";y End Sub Private Sub Command1_Click() x=1 y=1 Call add((x),(y)) Print"x="; x;",y=";y End SubA.x=1,y=1 x=2,y=2B.x=2,y=1 x=1,y=1C.x=1,y=1 x=1,y=1D.x=2,y=1 x=2,y=1

考题 当变量x=2,y=5时,以下程序的输出结果为 Do Until y>5 x=x*y y=y+1 Loop Print xA.2B.5C.10D.20

考题 有以下程序:include using namespace std;class sample{private: int x; static int 有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<<"x="<<s. x<<",y="<<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。A.x=10,y=20B.x=20,y=30C.x=30,y=20D.x=30,y=30

考题 下列语句正确的是A.If x≠y Then Print "x不等于y"B.If x<>y Then Print "x不等于y"C.If x><y Then Print "x不等于y"D.If x<>y Print "x不等于y"

考题 以下4个程序中,不能实现两个实参值进行交换的是 ( )。A.void swap (float *p, float *q) { float *t ,a; t = a; t = p; *p = *q; *q = *t; } void main () { float x = 8.0;y = 9.0; swap (x, y); cout<<x<<", "<<y<<B.void swap (float *p, float *q) { float a; a = *p; *p = *q; *q = a; } void main() { float x = 8.0;y = 9.0; swap (x, y); cout<<x<<", "<<y<<end1;C.void swap (float *p, float *q) { float x; x = *p; *p = *q; *q = x; } void main() { float a,b.; *a = 8.0;*b = 9.0; swap (a, b) ;D.void swap (float p, float q) { float a; a = p; p = q; q = a; } void main() { float a = 8.0,b = 9.0; swap (a,b); cout<<x<<", "<<y<<

考题 下面程序的运行结果是void swap(int *a,int *b){ int *t; t=a;a=b;b=t;}main(){ int x=3,y=5,*p=x,*q=y; swap(p,q); printf("%d%d\n",*p,*q);}

考题 运行下列程序: x=Input Box("input value Of x”) Select Case x Case IsO y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 以下程序段的输出结果是( )。 x=1 y=4 Do Until y4 x= x * y y=y+1 Loop Print XA.1SX 以下程序段的输出结果是( )。 x=1 y=4 Do Until y4 x= x * y y=y+1 Loop Print XA.1B.4C.8D.20

考题 运行下列程序: x=InputBox("input value of x") Select Case X Case Is>0 y=y+1 Case Is=0 y=x+2 Case ELse y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 有如下程序 x=InputBox("input value of x") Select Case x Case Is>0 y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x ;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 有以下程序:include void swap(char * x,ehar * y){ char t;t= *x; *x: *y; *y=t;main 有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。A.123,abeB.abe,123C.1bc,a23D.321,cba

考题 有如下程序: x = InputBox("Input value of x") Select Case x Case Is > 0 y=y+1 Case Is = 0 y=x + 2 Case Else y=x + 3 End Select Print x, y运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 下列程序执行的结果是______。 Private Sub Command1_Click() x=25 If x>0 Then y=1 If x>10 Then y=2 If x>20 Then y=3 If x>30 Then y=4 Print y End SubA.1B.2C.3D.4

考题 以下程序运行后,单击按钮输出结果是 Private Sub Commandl_Click( ) Dim x As Integer,y As Integer,z As Integer X=4:y=2: Z=3 Call Gopd(x,x,z) Print x;X;Z Call Gopd(x,y,y) Print x;y;y End Sub Private Sub Gopd(x As Integer,y As Integer,z As Integer) X=3 * Z + 1 y=2 * z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10

考题 单击按钮时,以下列程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=X+y End Sub Private Sub Command1_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call proc1(x,x,2) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 6 6 10B.9 5 10 5 10 10C.9 6 12 9 10 15D.9 5 10 5 4 10

考题 单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10

考题 (10)以下程序运行后的输出结果是 【10】 。#include stdio.hmain(){ int x=10,y=20,t=0;if(x==y)t=x;x=y;y=t;printf("%d %d\n",x,y);}

考题 语句print(x,y)()。A、输出x,yB、输出x,y的值C、出现错误信息D、输出(x,y)

考题 有以下程序  void swap(Char *x,Char *y)      {Char t;     t=*x;*x=*y;*y=t;      }   main( )  {Char *s1=”abc”,*s2=”123”;      swap(sl,s2);  printf(”%s,%s/n”,s1,s2);     }  程序执行后的输出结果是()A、abe,123B、123,abcC、321,cbaD、1bc,a23

考题 如果x的值大于或等于y的立方,则打印“OK”,表示这个条件的单行格式的If语句是()A、If x=y^3 Print “OK”B、If x=y*y*y Then “OK”C、If x=y^3 Then Print “OK”D、If x=y*y*y Then Print “OK” End If