Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to round the whole number?
How to round the whole number?
When VB assigns values to integer variables, if the original data has decimals, it will automatically carry or round, but it is not based on the principle of rounding, but "four into six, five into double", that is, the first digit on the right side of the decimal point is 4, 6, 5, and even digits. For example:

Mark x as an integer.

x = 2.5

The result of "Print X" is 2.

x = 3.5

The result of "Print X" is 4.

So 123.56 is 124.