Fix book 03_if_else

This commit is contained in:
Massimo Fidanza authored and Henk Oordt committed 2026-06-15 10:25:24 +02:00
1 parent f9b52302e8
commit 8052651802
1 file changed
+6 -6
+6 -6
View File
@@ -46,10 +46,10 @@ let number = 3;
if number < 5 {
println!("`number` is smaller than 5");
} else {
if number >= 3 {
println!("`number` is greater than or equal to 3, but smaller than 5");
if number < 8 {
println!("`number` is greater than or equal to 5, but smaller than 8");
} else {
println!("`number` is smaller than 3");
println!("`number` is greater than or equal to 8");
}
}
```
@@ -61,10 +61,10 @@ let number = 3;
if number < 5 {
println!("`number` is smaller than 5");
} else if number >= 3 {
println!("`number` is greater than or equal to 3, but smaller than 5");
} else if number < 8 {
println!("`number` is greater than or equal to 5, but smaller than 8");
} else {
println!("`number` is smaller than 3");
println!("`number` is greater than or equal to 8");
}
```