0
Define following constant
26,031,0 X BC4,0 X 2A
2 Respuestas
+ 2
To define a constant use the following syntax:
const <type> <name> {<value>};
Where:
<type> defines the type of the constant value.
<name> identifier for the constant.
<value> the value or expression to be assigned as constant value.
Example (in main):
const int A {26}; // <- decimal
const int B {031}; // <- octal
const int C {0xbc4}; // <- hexadecimal
const int D {0x2a}; // <- hexadecimal
cout << A << endl << B << endl << C << endl << D;
NOTE: Don't put spaces inside a hexadecimal number, just the base identifier 0x followed with the value, e.g. 0x12345.
Hth, cmiiw
0
What do you want to do? Please explain with as many detail as you can