Last Update 2009/03/29
TOP - JavaScript - 演算子 - * / %
乗法演算子は次の通りです。
* : 乗算
/ : 除算
% : 剰余
(例)
<SCRIPT type="text/javascript">
<!--
function btnclick()
{
var s = "10 * 2 → : " + (10 * 2) + "\n";
s = s + "10.3 * 3 → : " + (10.3 * 3) + "\n";
s = s + "4 / 5 → : " + (4 / 5) + "\n";
s = s + "4.3 / 2.3 → : " + (4.3 / 2.3) + "\n";
s = s + "20 % 3 → : " + (20 % 3) + "\n";
s = s + "23.3 % 6.3 → : " + (23.3 % 6.3) + "\n";
alert(s);
}
//-->
</SCRIPT>