Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - A problem about computer VB programming
A problem about computer VB programming
It should be \ instead of/? \ is an integer division of VB,/is just an ordinary division.

1 \ 1.5=0

2 \ 2.5= 1

3 \ 3.5=0

4 \ 4.5= 1

5 \ 5.4= 1

5 \ 5.5=0

5 \ 5.25= 1

Dividends are decimals, so they should be converted into integers before division. The conversion rule is: four, six, five, double (double refers to even number). Needless to say, "five, double" means: if the carry is odd, it will not be carried, and if it is even, it will be carried. For example, 1.5 is an even number, then 1 \ 1.5 is actually 1 \ 2, and the result is 0.5. The result of integer division is also an integer, so the final result is 0. For example, 2.5 is an odd number, so it is not carried.