Arrays Lab - Problem 03. Rounding Numbers
Здравейте,
Мисля, че решавам задачата правилно, но judge ми дава 75/100 (Test #4 (Incorrect answer)).
Код - тук.
Условие на задачата:
Read an array of real numbers (space separated), round them in "away from 0" style and print the output as in the examples:
Input |
Output |
0.9 1.5 2.4 2.5 3.14 |
0.9 => 1 1.5 => 2 2.4 => 2 2.5 => 3 3.14 => 3 |
-5.01 -1.599 -2.5 -1.50 0 |
-5.01 => -5 -1.599 => -2 -2.5 => -3 -1.50 => -2 0 => 0 |