Skip to content

Commit 3bc3370

Browse files
NateEagiHiD
andauthored
Improve interest-is-interesting exercise's concept introduction (#2343)
* Improve interest-is-interesting concept introduction Removes some unneeded words and clarifies a few points. * Update exercises/concept/interest-is-interesting/.docs/introduction.md Integrate review feedback. Co-authored-by: Jeremy Walker <[email protected]> --------- Co-authored-by: Jeremy Walker <[email protected]>
1 parent b337aa8 commit 3bc3370

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exercises/concept/interest-is-interesting/.docs/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ C# has three floating-point types:
1010

1111
- `float`: 4 bytes (~6-9 digits precision). Written as `2.45f`.
1212
- `double`: 8 bytes (~15-17 digits precision). This is the most common type. Written as `2.45` or `2.45d`.
13-
- `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`.
13+
- `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`.
1414

15-
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).
15+
As can be seen, each type can store a different number of digits. For example, trying to store PI in a `float` will only store the first 6 decimal places (with the last stored digit rounded).
1616

1717
## While Loops
1818

19-
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:
19+
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:
2020

2121
```csharp
2222
int x = 23;
@@ -37,7 +37,7 @@ int x = 23;
3737

3838
do
3939
{
40-
// Execute logic if x > 10
40+
// Execute body, repeating only if x > 10
4141
x = x - 2;
4242
} while (x > 10);
4343
```

0 commit comments

Comments
 (0)