题目内容 (请给出正确答案)
[单选题]

以下程序的输出结果是:() x= 10 while x: x -= 1 if not x%2: print(x,end = '')

A.86420

B.975311

C.97531

D.864200

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“以下程序的输出结果是:() x= 10 while x: x…”相关的问题

第1题

以下程序运行后的输出结果是______。 Private Sub Form_ Click() y=1 :x=2 Print Iif(x>=y,x,y) End Sub

A.0

B.1

C.2

D.3

点击查看答案

第2题

运行下面程序后,正确的输出结果是 ______。Private Sub Command1_ Click() x = 6 if x >6 then Print "x>6": Else if x <8 then Print "x<8"; Else if x = 6 then Print "x=6": End if End if End ifEnd Sub

A.x<8 x=6

B.x<8

C.x=6

D.x<8或x=6

点击查看答案

第3题

求比10小且大于等于0的偶数,x=10 while x: x = x-1 if x%2 != 0: _________ print(x)空白处应填入什么语句()。
A、break

B、continue

C、end

D、stop

点击查看答案

第4题

有以下程序:#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=20

B.x=20,y=30

C.x=30,y=20

D.x=30,y=30

点击查看答案

第5题

有以下程序:#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 sampte::y=0;int main(){ sample s1(10); sample s2(20); sample::print(s2); return 0;}程序运行后的输出结果是

A.x=10,y=20

B.x=20,y=30

C.x=30,y=20

D.x=30,y=30

点击查看答案

第6题

有以下类定义 class Point{ public: Point{int x = 0, int y=0) {_x = x; _y = y;} void Move int xoff, int yoff) {_x +=xoff;_y+=yoff;} void Print() const {cout<<'('<<_x<<','<<_y<<')' << end1;} private: int_x,_y; }; 下列语句中会发生编译错误的是

A.Point pt;pt.Print();

B.const Point pt;pt.Print();

C.Point pt;pt.Move(1, 2);

D.const Point pt;pt.Move(1, 2)

点击查看答案

第7题

假设X的值是5,则执行以下语句时,可得到的输出结果是ABCDEF的Select Case语句是 ( )

A.Select Case X Case 10 To 1 Print“ABCDEF” End Select

B.Select Case X Case Is>15,Is<5 Print"ABCDEF" End Select

C.Selecl Case K Case Is>5,1,3,To 10 Print"ABCDEF" End Select

D.Select Case X Case 1,3,Is>5 Print"ABCDEF" End Select

点击查看答案

第8题

在窗体上有一个命令按钮Command1,编写如下程序: Private Sub Command1_Click() Print pp1(3, 7) End Sub Public Function pp1(x As Single, n As Integer) As Single If n = 0 Then pp1= 1 Else If n Mod 2 = 1 Then pp1 =x*x+n Else pp1 =x*x-n End If End If End Function 程序运行后,单击该命令按钮,屏幕上显示的是( )。

A.2

B.1

C.0

D.16

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信