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

以下程序的输出结果是()。 Dim a%() = { 1, 2, 3, 4, 5, 6, 7 }, i% For i = 0 To a.GetUpperBound(0) a(i) = a(i) * a(i) Next MsgBox(a(i) )

A.49

B.0

C.不确定

D.程序出错

提问人:网友qianliangguo 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有5位网友选择 B,占比62.5%
  • · 有2位网友选择 C,占比25%
  • · 有1位网友选择 D,占比12.5%
匿名网友 选择了B
[58.***.***.98] 1天前
匿名网友 选择了B
[3.***.***.5] 1天前
匿名网友 选择了C
[226.***.***.30] 1天前
匿名网友 选择了B
[58.***.***.98] 1天前
匿名网友 选择了B
[94.***.***.128] 1天前
匿名网友 选择了C
[49.***.***.240] 1天前
匿名网友 选择了B
[3.***.***.5] 1天前
匿名网友 选择了B
[114.***.***.67] 1天前
匿名网友 选择了D
[178.***.***.213] 1天前
匿名网友 选择了B
[231.***.***.69] 1天前
匿名网友 选择了C
[226.***.***.30] 1天前
匿名网友 选择了C
[49.***.***.240] 1天前
匿名网友 选择了B
[94.***.***.128] 1天前
匿名网友 选择了C
[49.***.***.240] 1天前
匿名网友 选择了B
[3.***.***.5] 1天前
匿名网友 选择了B
[114.***.***.67] 1天前
匿名网友 选择了D
[178.***.***.213] 1天前
匿名网友 选择了B
[231.***.***.69] 1天前
匿名网友 选择了C
[226.***.***.30] 1天前
匿名网友 选择了B
[58.***.***.98] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“以下程序的输出结果是()。 Dim a%() = { 1, …”相关的问题
第1题
阅读以下说明和Java程序,将应填入(n)处的字句写在对应栏内

[说明]

以下程序的功能时三角形、矩形和正方形的面积输出。

程序由5个类组成:areatest是主类,类Triangle,Rectangle和Square分别表示三角形、矩形和正方形,抽象类Figure提供了一个计算面积的抽象方法。

[Java程序]

public class areatest {

public static viod main(string args[]){

Figure[]Figures={

New triangle(2,3,3),new rectangle(5,8),new square(5)

};

for(int i=0; i<Figures.length;i++){

system.out.println(Figures+"area="+Figures.getarea());

}

}

}

public abstract class figure {

public abstract double getarea();

}

public class rectangle extends (1) {

double height;

double width;

public rectangle (double height,double width){

this.height=height;

this.width=width;

}

public string tostring(){

return"rectangle:height="+height+",width="+width+":";

}

public double getarea(){

return (2)

}

}

public class square exends (3)

{

public square(double width){

(4);

}

public string tostring(){

return"square:width="+width":";

}

}

public class triangle entends (5)

{

double la;

double lb;

double lc;

public triangle(double la,double lb,double lc){

this.la=la;this.lb=lb;this.lc=lc;

}

public string tostring()(

return"triangle:sides="+la+","+lb+","+lc+":";

}

public double get area(){

double s=(la+lb+lc)/2.0;

return math.sqrt(s*(s-la)*(s-lb)*(s-lc));

}

}

点击查看答案
第2题
●试题六

阅读以下说明和C++程序,将应填入(n)处的语句写在答题纸的对应栏内。

【说明】

以下程序的功能是计算三角形、矩形和正方形的面积并输出。

程序由4个类组成:类Triangle、Rectangle和Square分别表示三角形、矩形和正方形;抽象类Figure提供了一个纯虚拟函数getArea(),作为计算上述3种图形面积的通用接口

【C++程序】

#include

#include

class Figure{

public:

virtual double getArea()=0:∥纯虚拟函数

};

class Rectangle: (1) {

protected:

double height;

double width;

public:

Rectangle(){};

Rectangle(double height,double width){

this->height=height;

this->width=width;

}

double getArea(){

return (2) ;

}

};

class Square: (3) {

public:

Square(double width){

(4) ;

}

};

class Triangle: (5) {

double la;

double Ib;

double lc;

public:

Triangle(double la,double lb,double lc){

This->la=la;this->lb=lb;this->lc=lc;

}

double getArea(){

double s=(la+lb+±c)/2.0;

return sqrt(s*(s-1a)*(s-1b)*(s-1c));

}

};

void main(){

Figure*figures[3]={

new Triangle(2,3,3),new Rectangle(5,8),new SqUare (5) );

for (int i=0;i<3;i++){

cout$amp;}

}

点击查看答案
第3题

My Love, My Umbrella (excerpt) by John McGahern It was the rain, the constant weather of this city, made my love inseparable from the umbrella, a black umbrella, white stitching on the seams of the imitation leather over the handle, the metal point bent where it was caught in Mooney's grating as we raced for the last bus to the garage out of Abbey Street. The band was playing when we met, the Blanchardstown Fife and Drum. They were playing Some day he'll come along/The man I love/And he'll be big and strong/The man I love at the back of the public lavatory on Burgh Quay, facing a few persons on the pavement in front of the Scotch House. It was the afternoon of a Sunday. 'It is strange, the band,' I said; her face flinched away, and in the same movement back, turned to see who'd spoken. Her skin under the black hair had the glow of health and youth, and the solidity at the bones of the hips gave promise of a rich seed-bed. 'It's strange,' she answered, and I was at once anxious for her body. The conductor stood on a wooden box, continually breaking off his conducting to engage in some running argument with a small grey man by his side, but whether he waved his stick jerkily or was bent in argument seemed to make no difference to the players. They turned their pages. The music plodded on, Some day he'll come along/The man I love/And he'll be big and strong/The man I love. At every interval they looked towards the clock, Mooney's clock across the river. 'They're watching the clock,' I said. 'Why?' her face turned again. 'They'll only play till the opening hour.' I too anxiously watched the clock. I was afraid she'd go when the band stopped. Lights came on inside the Scotch House. The music hurried. A white-aproned barman, a jangle of keys into the quickened music, began to unlock the folding shutters and with a resounding clash drew them back. As the tune ended the conductor signalled to the band that they could put away their instruments, got down from his box, and started to tap the small grey man on the shoulder with the baton as he began to argue in earnest. The band came across the road towards the lighted globes inside the Scotch House, where already many of their audience waited impatiently on the slow pulling of the pints. The small grey man carried the conductor's box as they passed in together. 'It is what we said would happen.' 'Yes.' The small family cars were making their careful way home across the bridge after their Sunday outings to their cold ham and tomato and lettuce, the wind blowing from the mouth of the river, gulls screeching above the stink of its low tide, as I forced the inanities towards an invitation. 'Would you come with me for a drink?' 'Why?' She blushed as she looked me full in the face. 'Why not?' 'I said I'd be back for tea.' 'We can have sandwiches.' 'But why do you want me to?' 'I'd like very much if you come. Will you come?' 'All right I'll come but I don't know why.' It was how we began, the wind blowing from the mouth of the river while the Blanchardstown Fife and Drum downed their first thirst-quencher in the Scotch House.

点击查看答案
第4题
下列不属控件的一项是( )。

A、文本框

B、标签

C、列表框

D、消息框

点击查看答案
第5题
( )对象不能响应Click事件。

A、计时器

B、图片框

C、窗体

D、列表框

点击查看答案
第6题
窗体上有一个名为HScrollBar1的水平滚动条和一个名为TextBox1的文本框。当移动滚动条中的滑块时,在文本框中显示滑块的当前位置值。为了实现该功能,需要将下面的语句放入( )事件过程中。 TextBox1.Text = HScrollBar1.Value

A、滚动条的GotFocus事件过程

B、滚动条的Scroll事件过程

C、文本框的KeyPress事件过程

D、文本框的TextChanged事件过程

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

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

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

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