试题与答案

有如下嵌套的if语句 if(a<b) if(a<c)k=a; else k

题型:单项选择题

题目:

有如下嵌套的if语句
if(a<b)
if(a<c)k=a;
else k=c;
else
if(b<c)k=b;
else k=c;
以下选项中与上述if语句等价的语句是______。

A.k=(a<b)((a<c)a:c):((b<c)h:c);
B.k=(a<b)((b<c)a:b):((h>c)b:c);
C.k=(a<b)a:b;k=(b<c)b:c;
D.k=(a<b)a:h:k=(a<c)a:c;

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0430/6f47d0a7e1e0314cb6856088d72b86ab.html

下面是错误答案,用来干扰机器的。

参考答案:A, D

试题推荐
题型:单项选择题

舌尖现象:在问题解决过程中通常会遇见的体验是所谓的“舌尖现象”,这是一种“几乎就有了”的感受,答案就在嘴边,我们能够清晰地感觉到,却没有办法把它说出口,或加以具体的描述。这是因为大脑对记忆内容的暂时性抑制所造成的,这种抑制受多方面因素影响。
根据上述定义,以下现象属于“舌尖现象”的是( )。

A.小欣做了一份非常漂亮的策划方案纸稿,却在展示时没法运用恰当的语言表述出方案中的精华部分,最后还是同事帮忙才得以过关
B.老林在逛街时遇到多年前的同学,由于时间太过久远,印象模糊,导致他怎么也叫不出该同学的名字
C.小轩为了准备即将到来的GRE考试,突击强记英语词汇,但早晨刚记忆的200个词汇,到了晚上就忘记大半
D.小茜参加数学竞赛时,有道很熟悉的大题,记得老师辅导时讲过,但就是想不起来怎么做,交了卷刚出考场,就回忆起老师讲过的解法

查看答案
题型:阅读理解

Australia---The vote for euthanasia(安乐死)was finally taken at 3:45 this morning. After six months’ argument and final 16 hours’ hot debates, Australia’s Northern Territory became the first legal authority in the world to allow doctors to take the lives of incurably ill patients who wish to die. The bill was passed by the vote of 15 to 10. Almost immediately word flashed on the Internet and was picked up, half a world away, by John Hofsess, the director of the Right to Die Society of Canada. He sent it on through the group’s on-line service, Death NET. Hofsess says, “We posted it all day long, because this isn’t just something that happened in Australia. It’s world history.”

The full import may take a while to understand. The NT Rights of the Terminally III law has left physicians and citizens trying to deal with its moral and practical meaning. Some have breathed sighs of relief, but others, including churches, right to life groups and the Australian Medical Association, bitterly attacked the bill and the haste(匆忙,急忙) of its passage. But the tide is unlikely to turn back. In Australia — where an aging population, life extending technology and changing community attitudes have all played their part — other states are going to consider making a similar law to for euthanasia. In the US and Canada, where the right to die movement is gathering strength, observers are waiting for the dominoes(多米诺骨牌) to start falling.

Under the new Northern Territory law, an adult patient can request death — probably by a deadly injection or pill — to put an end to suffering. The patient must be diagnosed as incurably ill by two doctors. After a “cooling off” period of seven days, the patient can sign a certificate of request. After 48 hours the wish for death can be met. For Lloyd Nickson, a 54 year old Darwin man suffering from lung cancer, the law means he can get on with living without the fear of his suffering: a terrifying death from his breathing condition. “I’m not afraid of dying from a spiritual point of view, but what I was afraid of was how I’d go, because I’ve watched people die in the hospital fighting for oxygen and clawing at their masks,” he says.

小题1:According to the text ,which of the following statements is TRUE?

A.Australia now is the only country in the world to pass the law of euthanasia.

B.All people in Australia don’t have the same positive attitude to euthanasia.

C.Many patients will ask their doctors for euthanasia because they are afraid of death.

D.According to the law, if a patient requests death, his or her wish will be met after 48 hours.小题2:The underlined sentence in Para 2, “observers are waiting for the dominoes to start falling.” means that observers are waiting to see ___________.

A.the result of the game of dominoes.

B.that people’s attitude to euthanasia will be changed.

C.that the bill about euthanasia in Australia will come to an end.

D.the similar bills will be passed in other countries.小题3:Australia was the first country to pass the bill of euthanasia, but not USA or Canada. Which one is NOT the reason ?

A.In Australia, the technology of extending life is advanced.

B.In Australia, it is easy to deal with the moral and practical meaning.

C.In Australia, old people take up great part in the population of the whole country.

D.Australians gradually realize suffering from a terrible disease is worse than immediate death.小题4:It can be inferred from the text that _____________.

A.when Lloyd Nickson dies, he will face his death with calm characteristic of euthanasia.

B.physicians and citizens in Australia share the same view on euthanasia.

C.other countries are going to consider making a similar law to deal with euthanasia.

D.under the bill, patients requesting death are sure to be injected by deadly medicine.小题5:What’s the author’s attitude to euthanasia?

A.Negative

B.Critical

C.Positive

D.Doubtful

查看答案
微信公众账号搜索答案