Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions concepts/numbers/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ people += 2;
eggs += 3 * people;
// eggs is now 6
```
Vairables `people` & `eggs` are initialized to `0`.
Then, we add integer value `2` over the existing value `0` of the variable `people` and assigne it back to `people`.
Variables `people` & `eggs` are initialized to `0`.
Then, we add integer value `2` over the existing value `0` of the variable `people` and assign it back to `people`.
`people` becomes `2` now.
Later, we add `3` eggs for each person, which turns out to be `6` eggs in total.
Now add this `6` to existing value `0` of the variable `eggs` and assigne it back to `eggs`.
Now add this `6` to existing value `0` of the variable `eggs` and assign it back to `eggs`.
`eggs` will be `6` now.
The equivalent expression would be `people = people + 2` and `eggs = eggs + (3 * people)`


[cpp_numerical_bases]: https://cplusplus.com/doc/hex/
[cpp_numerical_bases]: https://cplusplus.com/doc/hex/