Skip to content
Snippets Groups Projects
Commit d707f9d3 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

Merge branch 'control_bis' into 'main'

old and new control merged

See merge request orestis.malaspin/rust-101!49
parents a1412887 5535f272
Branches
No related tags found
1 merge request!49old and new control merged
Pipeline #26074 passed
......@@ -30,6 +30,7 @@ fn main() {
} else {
0 // pas de ;
}; // attention au ;
println!("Le signe de x est {sign}.");
}
```
......@@ -37,10 +38,8 @@ fn main() {
```rust [] ignore
fn main() {
let mut x = 0;
loop {
println!("En boucle!");
x += 1;
}
}
```
......@@ -87,12 +86,7 @@ fn main() {
println!("Fin de la boucle!");
}
```
- `0..10` de `0` à `10` non inclus.
- `0..10` est une `Range` (une collection).
## La boucle `for` ++
```rust ignore
for i in collection {
// instructions
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment