On Thu, Mar 05, 2020 at 02:22:03PM +0100, Patrick Dupre wrote:
> > After sorting the list is:
> > 0 -5.5e-06 3 25 56 88 100
> > -5.5e-06 2 3 25 56 88 100
>
>
> #include
> #include
>
> double values[] = { 88, 56, 100, 0.0, 25, 3, -0.55e-5 };
> double values2 [] = { 88, 56, 100, 2, 25, 3, -0.
your function indeed needs to return an int, but the computation doesn't
look like an int.
you will need to compare, and return one of -1,0,1, not subtract the values.
On 3/5/20 8:22 AM, Patrick Dupre wrote:
Hello,
In this example, if I put a 0, the sorting is wrong which must be standard c
Hello,
In this example, if I put a 0, the sorting is wrong which must be standard c
> After sorting the list is:
> 0 -5.5e-06 3 25 56 88 100
> -5.5e-06 2 3 25 56 88 100
#include
#include
double values[] = { 88, 56, 100, 0.0, 25, 3, -0.55e-5 };
double values2 [] = { 88, 56, 100, 2, 25, 3,