fix(guide): Fix all frontmatter
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
title:While-loop
|
||||
title: While-loop
|
||||
localeTitle: undefined
|
||||
---
|
||||
只要给定条件为真,while循环语句就会重复执行目标语句。
|
||||
@ -11,21 +11,21 @@ while循环的一个关键点是循环可能永远不会运行。 当测试条
|
||||
例:
|
||||
|
||||
```C++
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main () {
|
||||
// Local variable declaration:
|
||||
int a = 10;
|
||||
|
||||
// while loop execution
|
||||
while( a < 20 ) {
|
||||
cout << "value of a: " << a << endl;
|
||||
a++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main () {
|
||||
// Local variable declaration:
|
||||
int a = 10;
|
||||
|
||||
// while loop execution
|
||||
while( a < 20 ) {
|
||||
cout << "value of a: " << a << endl;
|
||||
a++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
输出:
|
||||
|
Reference in New Issue
Block a user