teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

修正

2018/09/19 08:51

投稿

LouiS0616
LouiS0616

スコア35678

answer CHANGED
@@ -1,3 +1,8 @@
1
+ **追記:**
2
+ A-pZさんのおっしゃるように、『上2桁だけを取り出す』処理にはなってないですね。
3
+ 適切な除数を選べば、少なくとも正数の範囲では除算で取り出し可能です。
4
+
5
+ ---
1
6
  はい。
2
7
  > **15.17.2. Division Operator /**
3
8
  The binary / operator performs division, producing the quotient of its operands. The left-hand operand is the dividend and the right-hand operand is the divisor.