Okay, so here's my question:
Write a program that orders three double numbers by increasing value. The program
should include a function named sort3 that takes three double * arguments (pointer
to double). The function prototype is
void sort3(double *x, double *y, double *z);
The function should reorder the values pointed to by its arguments so that after the call
sort3(&x, &y, &z);
the numbers satisfy .
Your program should input data and print results using the following format:
Enter three numbers: 4.7 1.4 3.2
The ordered sequence is: 1.4 3.2 4.7
And here is my program:
C code - 32 lines - codepad
I am getting a lot of errors when I run it through GCC. Can someone help me out here ASAP?
Oh and I can only use pointers.