作业帮 > 英语 > 作业

帮忙翻译哭了哦我int max_tries = 3; int tries_cnt = 0; while ( tries_

来源:学生作业帮 编辑:神马作文网作业帮 分类:英语作业 时间:2024/11/13 12:35:32
帮忙翻译哭了哦我
int max_tries = 3;
int tries_cnt = 0;
while ( tries_cnt < max_tries )
{
// read user guess
if ( usr_guess == next_elem )
break; // terminate loop
tries_cnt++;
// more stuff
}
The program can short-circuit execution of the current iteration of the
loop by executing a continue statement. For example, consider the
following program fragment in which all words of fewer than four characters
are discarded:
帮忙翻译哭了哦我int max_tries = 3; int tries_cnt = 0; while ( tries_
int max_tries = 3;
int tries_cnt = 0;
while ( tries_cnt < max_tries )
{
// read user guess 读取用户猜想
if ( usr_guess == next_elem )
break; // terminate loop 循环结束(用户猜对了)
tries_cnt++;
// more stuff
}
这个程序通过continure语句来能缩短循环
比如,当程序标识少于4个字母时,不予处理
你给的都翻了,不过程序似乎不完整啊