diff --git a/concepts/numbers/about.md b/concepts/numbers/about.md index 223f35eb..5053e489 100644 --- a/concepts/numbers/about.md +++ b/concepts/numbers/about.md @@ -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. diff --git a/concepts/numbers/introduction.md b/concepts/numbers/introduction.md index 30c7fe2e..c246cd42 100644 --- a/concepts/numbers/introduction.md +++ b/concepts/numbers/introduction.md @@ -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. diff --git a/exercises/concept/freelancer-rates/.docs/introduction.md b/exercises/concept/freelancer-rates/.docs/introduction.md index 83c6c141..c246cd42 100644 --- a/exercises/concept/freelancer-rates/.docs/introduction.md +++ b/exercises/concept/freelancer-rates/.docs/introduction.md @@ -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].