From e04b939ac449ebdddd4b45b5dd4ffe92bc2c0b84 Mon Sep 17 00:00:00 2001 From: Nate Eagleson Date: Wed, 4 Dec 2024 00:17:28 -0500 Subject: [PATCH] Improve interest-is-interesting concept introduction Removes some unneeded words and clarifies a few points. --- .../concept/interest-is-interesting/.docs/introduction.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/concept/interest-is-interesting/.docs/introduction.md b/exercises/concept/interest-is-interesting/.docs/introduction.md index a323efa391..059fc524c0 100644 --- a/exercises/concept/interest-is-interesting/.docs/introduction.md +++ b/exercises/concept/interest-is-interesting/.docs/introduction.md @@ -10,13 +10,13 @@ C# has three floating-point types: - `float`: 4 bytes (~6-9 digits precision). Written as `2.45f`. - `double`: 8 bytes (~15-17 digits precision). This is the most common type. Written as `2.45` or `2.45d`. -- `decimal`: 16 bytes (28-29 digits precision). Normally used when working with monetary data, as its precision leads to less rounding errors. Written as `2.45m`. +- `decimal`: 16 bytes (28-29 digits precision). Normally used when working with monetary data, as its precision reduces the chance of rounding errors. Written as `2.45m`. -As can be seen, each type can store a different number of digits. This means that trying to store PI in a `float` will only store the first 6 to 9 digits (with the last digit being rounded). +As can be seen, each type can store a different number of digits. Trying to store PI in a `float` will only store the first 6 decimal places (with the last stored digit rounded). ## While Loops -In this exercise you may also want to use a loop. There are several ways to write loops in C#, but the `while` loop is most appropriate here: +In this exercise you may want to use a loop. There are several ways to write loops in C#, but the `while` loop is most appropriate here: ```csharp int x = 23; @@ -37,7 +37,7 @@ int x = 23; do { - // Execute logic if x > 10 + // Execute body, repeating only if x > 10 x = x - 2; } while (x > 10); ```