Skip to content
Open
Show file tree
Hide file tree
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/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Floating point numbers are numbers with a decimal point like `6.02214076`, `0.1`
The following example shows the declaration and initialization of four different variables

```cpp
int m_morales{9241}; // base 10: 0-9
int m_morales{9421}; // base 10: 0-9
int a_apaec{0x24CD}; // base 16: 0-9 and A-F
int m_gargan{0b10010000011001}; // base 2: 0-1
int b_reilly{022031}; // base 8: 0-7
int m_gargan{0b10010011001101}; // base 2: 0-1
int b_reilly{022315}; // base 8: 0-7
// Leading with a 0 not the letter o.
```

When you assign a value to an `int` variable, you can do so directly with a literal.
A literal is a hard-coded number like `9241`.
A literal is a hard-coded number like `9421`.
There are different integer literals for several bases of the representation.
Decimal integer literals are the most common and use the digits `0` to `9`.
By adding a special prefix, like `0x`, it is possible to use other bases.
Expand Down
8 changes: 4 additions & 4 deletions concepts/numbers/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Floating point numbers are numbers with a decimal point like `6.02214076`, `0.1`
The following example shows the declaration and initialization of four different variables

```cpp
int m_morales{9241}; // base 10: 0-9
int m_morales{9421}; // base 10: 0-9
int a_apaec{0x24CD}; // base 16: 0-9 and A-F
int m_gargan{0b10010000011001}; // base 2: 0-1
int b_reilly{022031}; // base 8: 0-7
int m_gargan{0b10010011001101}; // base 2: 0-1
int b_reilly{022315}; // base 8: 0-7
// Leading with a 0 not the letter o.
```

When you assign a value to an `int` variable, you can do so directly with a literal.
A literal is a hard-coded number like `9241`.
A literal is a hard-coded number like `9421`.
There are different integer literals for several bases of the representation.
Decimal integer literals are the most common and use the digits `0` to `9`.
By adding a special prefix, like `0x`, it is possible to use other bases.
Expand Down
10 changes: 5 additions & 5 deletions exercises/concept/freelancer-rates/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ Floating point numbers are numbers with a decimal point like `6.02214076`, `0.1`
The following example shows the declaration and initialization of four different variables

```cpp
int m_morales{9241}; // base 10: 0-9
int m_morales{9421}; // base 10: 0-9
int a_apaec{0x24CD}; // base 16: 0-9 and A-F
int m_gargan{0b10010000011001}; // base 2: 0-1
int b_reilly{022031}; // base 8: 0-7
int m_gargan{0b10010011001101}; // base 2: 0-1
int b_reilly{022315}; // base 8: 0-7
// Leading with a 0 not the letter o.
```

When you assign a value to an `int` variable, you can do so directly with a literal.
A literal is a hard-coded number like `9241`.
A literal is a hard-coded number like `9421`.
There are different integer literals for several bases of the representation.
Decimal integer literals are the most common and use the digits `0` to `9`.
By adding a special prefix, like `0x`, it is possible to use other bases.
The example above shows the number `9241` in its four representations and prefixes.
The example above shows the number `9421` in its four representations and prefixes.
All variables are initialized to the same value.

For more details on the different representation systems, take a look at [a small tutorial][cpp_numerical_bases].
Expand Down
Loading