Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
5 を 2 で割ると、10 進数の 2.5 が得られます。
私が望むのは、10進数ではなく、10進数の除数演算子を使用せずに、INTEGER数値を2で除算することです/。
/
次に、たとえば、5/2=2、9/2=4、11/2=5 などの結果を取得したいと考えています。
VB で小数除算ではなく整数除算を実行するには、適切な演算子を使用する必要があります。
演算子は/10 進数の除算です。演算子は\整数除算用です。
\
1 / 2 'results in 0.5 1 \ 2 'result in 0
簡単な方法は、負のラウンドの負を使用することです。