At the end of the day, you can implement the exact same program using a while loop that you can using a for loop, it's just your code is going to look slightly different.
最终,你可以执行这个程序,再使用for循环的地方使用while循环,这只是使你的代码看起来稍微有点不同。
You seem to be upset.
你看起来有点沮丧。
So conceptually the key difference here, besides the syntax looking slightly different, it just means that if you want a chunk of code to execute no matter what initially, ; you can use the do while loop; if you want to check a condition first, you can use the while loop.
所以概念上,则关键的区别是,除了语法看起来有点不同,它的意思是如果你想要一段代码,最初无论如何都要执行,你就可以用do,while循环;,如果你想要先检查条件,你可以用while循环。
This might look a little cryptic at first, but it turns there is some very obvious patterns here, for instance. According to this chart, if you want to represent the letter A A in the so called ASCII system, what number do you actually use to do so?
起初,它看起来有点神秘,但你会发现它有一些明显的对应模式,这里就有例子,根据图表,在所谓的ASCII系统中,你想表示字母,你该用哪些数字呢?
应用推荐