|
Arithmetical operations include additive and multiplicative operations:
算術演算には、加法と乗法の演算が含まれます。
Sum of values i = j + 2;
加算
Difference of values i = j - 3;
減算
Changing the operation sign x = - x;
符号の反転
Product of values z = 3 * x;
乗算
Division quotient i = j / 5;
除算
Division remainder minutes = time % 60;
剰余
Adding 1 to the variable value i++;
変数に1を加算する(インクリメント)
Subtracting 1 from the variable value k--;
変数から1を減算する(デクリメント)
The operations of adding/subtracting 1 (increment/decrement) cannot be
used in expressions.
加算/減算 1 (インクリメント/デクリメント)の演算は、式の中では使用できません。
Examples:
例:
int a=3;
a++; // valid expression
有効な式
int b=(a++)*3; // invalid expression
無効な式
|