开发者

convert a Pseudocode into c# code

i have a very simple question,how can i convert and use this Pseudocode in c# code?

repeat
 i=i+1;
 until x[i]>=j

i mean what code in c# does the sam开发者_开发知识库e work of this code?thanks


You could use a do/while loop:

do {
    i++;
} while (x[i] < j);


Also:

do {} while (x[++i] < j);

(Purely as a stylistic alternative)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜