+ 1
My code no dot work as might
why this code return 18 with input 8 0 -10 0 2 4 0 3 3 0 7 0 4 5 5 -9 9 , should return 22.5 https://code.sololearn.com/cSpgRYB8oj5D/?ref=app
4 Réponses
0
As given above try changing at least one variable in the right side expression to double
0
when you are computing values for s1 and s2, typecast atleast one variable in the right side expression to double. This is because in C++, integer expressions always result in integers unless type casted to double.
Eg.
S_1 = (max_1 - min_1) / 2.0d
0
how can i fix it!
0
thank you