Sobes.tech
Intern — Middle

Determining the output during implicit type conversion

livecode

Task condition

It is necessary to predict what result will appear in the console after executing the following code:

double d = 5.8;
int i = d;
cout << d << "=" << i << "=" << (i / 2 * 2);