From 805265180271e62a203d35c88ed3925117b8eb91 Mon Sep 17 00:00:00 2001 From: Massimo Fidanza Date: Sun, 15 Mar 2026 18:28:37 +0100 Subject: [PATCH] Fix book 03_if_else --- book/src/02_basic_calculator/03_if_else.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/book/src/02_basic_calculator/03_if_else.md b/book/src/02_basic_calculator/03_if_else.md index 44a1270..365f550 100644 --- a/book/src/02_basic_calculator/03_if_else.md +++ b/book/src/02_basic_calculator/03_if_else.md @@ -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"); } ```