There is a contest! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | July.13.2015 at 11:57:42 AM | |
0 | -- Test 1 --- 3 8
--- Pattern --- 12
|
imesecan | Nov.12.2015 at 09:23:14 AM | |
1 | When you divide a number by 2, the result can be floating point number (as in 3 divided by 2 is 1.5).
However, the division operator in most programming languages automatically defines the type of the operation according to the input. If both operands are integers, the division operator does integer division (3/2==>1) in which the floating point part is ignored. If you want to force an arithmetic operator to be forced to floating point operation, you need to typecast of the operands of the division operator: float res = (float)3 / 2 ;
|
tmonka21 | Nov.24.2021 at 10:17:34 PM
| 2 | Сообщение скрыто
|
|