Task 16 Average of an array Overfloating Bug

Back to General discussions forum

DMN_user     2015-12-04 10:20:13
User avatar

hello,

this is codeAbbey's javascript's parser result: 75 703 398 97 3298 2097 93 2442 135 278 98
this is          my javascript's parser result: 75 704 399 97 3298 2098 93 2443 135 278 98
------------------------------------------------------------------------------------------
                                                OK   !   ! OK   OK    ! OK    !  OK  OK OK

I believe it's sure the parse's dirty jobs with overloat. I'm using NetBeans for he scripts. Dont think anything we can do in this abscration level (or we can but it's a loooong trip)

So, I guess Task #16 is correct for all those with the same bug +me :-)

Quandray     2015-12-04 11:00:42
User avatar

Hi,

You don't make it easy to help you, because your code doesn't read from standard input nor write to standard output.

This problem is about rounding to the nearest integer, but your code uses Math.ceil which won't round to the nearest integer.

Rodion (admin)     2015-12-04 13:56:17
User avatar

I've slightly edited the first message to fix formatting. And yes, it looks Quandray is quite right - ceil function would not work properly instead of round :)

Please login and solve 5 problems to be able to post at forum