计算机专业英语翻译6

cout << "Ah, this is harder than it looks, isn't it?\n";
However, only one of the three conditions can be true at any one time.
If one of the if statements is true, the others must be false. We can
reflect the relationship among the if statements by stringing them
together with a series of else-if clauses:

if ( num_tries == 1 )
cout << "Oops! Nice guess but not quite it.\n";
else
if ( num_tries == 2 )
cout << "Hmm. Sorry. Wrong again.\n";
else
if ( num_tries == 3 )
cout << "Ah, this is harder than it looks, isn't it?\n";
else

温馨提示:答案为网友推荐,仅供参考
第1个回答  2006-11-18
However, only one of the three conditions can be true at any one time.
If one of the if statements is true, the others must be false. We can
reflect the relationship among the if statements by stringing them
together with a series of else-if clauses:
我觉得只有这一段有翻译价值,剩下的保留原文就可以。

cout << "Ah, this is harder than it looks, isn't it?\n";
然而每一次三种条件中,只有一种条件能够成立。
如果if语句之一成立为真,则其他的均为假不成立。
这种关系在以下一套else-if从句中放在一起体现出来:
if ( num_tries == 1 )
cout << "Oops! Nice guess but not quite it.\n";
else
if ( num_tries == 2 )
cout << "Hmm. Sorry. Wrong again.\n";
else
if ( num_tries == 3 )
cout << "Ah, this is harder than it looks, isn't it?\n";
else

我最喜欢的瓶子测试,分享一下啊~~~http://www.eshangxue.com/discuz/viewthread.php?tid=737本回答被网友采纳