float x, y, z;
x = 0.1;
y = 0.2;
z = 0.3;
if (x + y == z)
cout << "True" << endl;
else
cout << "False" << endl;
I read a question that says 0.1 + 0.2 == 0.3 -> false, when I changed it into variables. It caused true. Why this happens?