From 8d862ef2bb5422219f1f56d000a74a7b4a77f0b5 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Sun, 25 Aug 2024 03:28:49 +0000 Subject: [PATCH] Update Examples --- Examples.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Examples.md b/Examples.md index f564a63..35e3c3e 100644 --- a/Examples.md +++ b/Examples.md @@ -673,11 +673,11 @@ fn main() { let big_n = if n < 10 && n > -10 { - println!(", and is a small number, increase ten-fold"); + println!(", and is small, × 10"); // This expression returns an `i32`. 10 * n } else { - println!(", and is a big number, halve the number"); + println!(", and is big, / 2"); // So here must return `i32` as well. n / 2 // TODO ^ Try inserting a semicolon. @@ -703,11 +703,11 @@ fn main //! Note more literate logical operators let big_n = if n < 10 and n > -10 - println! ", and is a small number, increase ten-fold" + println! ", and is small, × 10" // This expression returns an `i32`. 10 * n else - println! ", and is a big number, halve the number" + println! ", and is big, / 2" // So here must return `i32` as well. n / 2 // TODO ^ Try inserting a semicolon. @@ -716,6 +716,5 @@ fn main //! ^ Husht FTW! println! "{} -> {}", n, big_n - ``` \ No newline at end of file