计算机专业英语翻译!急谢谢啊!

来源:百度知道 编辑:UC知道 时间:2024/05/09 10:39:47
Our outer while loop executes until the user says she wishes to stop:

bool next_seq = true;
while ( next_seq == true )
{
// ...
if ( try_again == 'N' || try_again == 'n' )
next_seq = false;
}
Were next_seq initialized to false, the statement block would not be
executed. The nested while loop allowing our user multiple guesses
behaves similarly.
朋友谢谢您的回答,不够我需要的不是讲解,而是直接翻译啊

这是c或c++里的while语句,属于循环语句的一种
Our outer while loop executes until the user says she wishes to stop: //这句的意思是while语句一直执行,直到用户限定的条件不满足为止

bool next_seq = true;
while ( next_seq == true )
{
// ...
if ( try_again == \'N\' || try_again == \'n\' )
next_seq = false;
} //这是程序段,首先声明一个bool形变量next_seq并设初值为真(true),{}之间的是当条件next_seq == true 满足时要做的事,最后的if语句(据本人猜测)可能是程序中要求用户输入一个符号表示\"是(y)或(n)否\",然后判断输入的到底是是还是否,若输入的是否则把next_seq改为false,此时while语句执行条件便不再满足了。