На этом уроке мы рассмотрим бинарные арифметические операции 2 и 3 ранга:
* - умножить,
/ - разделить,
% - получить остаток от деления,
+ - сложить,
- - вычесть,
а также особенности использования этих операций с целыми и вещественными числами.
Дата отправки отчёта:
8 января 2019 г.
Задание выполнено: за
30 мин.
Чему научился:
the operation has arguments and results.
Operations are performed in rank from 1 to 13
In order of execution: 1) ++ (increment) - (decrement) + (unary plus sign change), - (change sign unary minus), ~ (tilde invert bits for integers), ! (invert the value of the logical variable), (type) (explicit or forced conversion to type, type conversion)
======= 2) * (multiplication) IMPORTANT !!! (2.0 * 3 - this does not compile) if one of the operands is fractional, then
the result is fractional, / (integer division results in an exceptionally integer number), IMPORTANT !!! if needed
non-integer result, one of the operands must be fractional % remainder of the division ======= 3) + addition (the result is real if one operand is real), - subtraction + (concat) ======= 4) <<, >>, >>> ======= 5) <, <=,>, => ======= 6) ==,! = ======= 7) & ======= 8) ^ ======= 9) | ======= 10) && ======= 11) || ======= 12) ?: ======= 13) = (assignment)
Научился: Попробовала выполнить арифметические и алгебраические операции 2-го ранга в Java с разными типами данных Трудности: найти верную запись для функции возведения в степень в java