user54800: I am trying to convert 1.06 to 106 by multiplying by 100 but the answer comes 105, I do not know why. Variable ver can be any decimal in this format x.xx
float ver = 1.06;
int vers = ver * 100;
vm[0] = (vers / 100U) % 10;
vm[1] = (vers / 10U) % 10;
vm[2] = (vers / 1U) % 10;
Serial.println(vers);  

Could  you let me know what I am doing wrong or maybe I have to do something else.

user7508: 1.06 is not a float. The closest float is 1.059999942779541015625. If
you multiply that by 100 you get a number that, again, is not a float.
Rounding to the nearest float yields 105.99999237060546875, which is the
result of the expression ver * 100, and just one ULP short of 106.
Yes, floating point computations do quite usually involve rounding
steps.
Casting to an int implicitly rounds towards zero, and you get 105,
which is the correct result. Correct according to the rules of IEEE 754
arithmetics.
You may want to round() to the nearest integer before the cast.

Variable ver can be any decimal in this format x.xx

No, a float cannot be “any decimal” in this format. Floats are stored
in binary, and most decimal numbers (numbers that can be written with a
finite number of decimal digits) cannot be written in binary with a
finite number of bits.
Except for a few values (namely the multiples of 0.25), ver can only
store an approximation of the decimal number.

54800: <p>I am trying to convert 1.06 to 106 by multiplying by 100 but the answer comes 105, I do not know why. Variable ver can be any decimal in this format x.xx</p>
<pre><code>float ver = 1.06;
int vers = ver * 100;
vm[0] = (vers / 100U) % 10;
vm[1] = (vers / 10U) % 10;
vm[2] = (vers / 1U) % 10;
Serial.println(vers);  
</code></pre>
<p>Could  you let me know what I am doing wrong or maybe I have to do something else.</p>
 7508: <p>1.06 is not a float. The closest float is 1.059999942779541015625. If
you multiply that by 100 you get a number that, again, is not a float.
Rounding to the nearest float yields 105.99999237060546875, which is the
result of the expression <code>ver * 100</code>, and just one <a href="https://en.wikipedia.org/wiki/Unit_in_the_last_place" rel="nofollow noreferrer">ULP</a> short of 106.
Yes, floating point computations do quite usually involve rounding
steps.</p>
<p>Casting to an <code>int</code> implicitly rounds towards zero, and you get 105,
which is the correct result. Correct according to the rules of IEEE 754
arithmetics.</p>
<p>You may want to <code>round()</code> to the nearest integer before the cast.</p>
<blockquote>
<p>Variable ver can be any decimal in this format x.xx</p>
</blockquote>
<p>No, a <code>float</code> cannot be “any decimal” in this format. Floats are stored
in binary, and most decimal numbers (numbers that can be written with a
finite number of decimal digits) cannot be written in binary with a
finite number of bits.</p>
<p>Except for a few values (namely the multiples of 0.25), <code>ver</code> can only
store an <em>approximation</em> of the decimal number.</p>
