CAN SOMEONE HELP ME PLEASE.
AnakNgDiyos (2)

Scenario
Write a program that sorts ten floating-point numbers in descending order. In this case, the data in the array is initialized (in the code
below). The algorithm is described in Chapter 4.3. After each execution of the inner loop, your program should print the values on the
screen (with another small loop). You can use the "%.2f" format in printf. Your version of the program must print the same result as the
expected output.

#include <stdio.h>
int main()
{
float numbers[10] = {5.6, 4.3, 6.2, 6.4, 7.3, 2.3, 8.3, 9.2, 0.1, 1.9};
/ your code /
return 0;
}

Example output
5.60 6.20 6.40 7.30 4.30 8.30 9.20 2.30 1.90 0.10
6.20 6.40 7.30 5.60 8.30 9.20 4.30 2.30 1.90 0.10
6.40 7.30 6.20 8.30 9.20 5.60 4.30 2.30 1.90 0.10
7.30 6.40 8.30 9.20 6.20 5.60 4.30 2.30 1.90 0.10
7.30 8.30 9.20 6.40 6.20 5.60 4.30 2.30 1.90 0.10
8.30 9.20 7.30 6.40 6.20 5.60 4.30 2.30 1.90 0.10
9.20 8.30 7.30 6.40 6.20 5.60 4.30 2.30 1.90 0.10
9.20 8.30 7.30 6.40 6.20 5.60 4.30 2.30 1.90 0.10
9.20 8.30 7.30 6.40 6.20 5.60 4.30 2.30 1.90 0.10

You are viewing a single comment. View All
barrycarter (12)

I'm guessing you can't use the built in sort function, so it would be good to know what algorithm Chapter 4.3 describes

AnakNgDiyos (2)

Somebody told me that I should use "for" for [email protected]

barrycarter (12)

@AnakNgDiyos I think I'm going to need more than that. Do you know if you're doing bubble sort, quick sort, or anything?

barrycarter (12)

@AnakNgDiyos OK, I think I can help. Ping me here or on the Discord server in about 2 hours from now (11:30am MDT = 1730 UTC) -- you can make your repl.it multiplayer and we can talk using Discord's voice chat.

AnakNgDiyos (2)

Sorry but I can't online that time, because I'm busy at [email protected]

barrycarter (12)

@AnakNgDiyos OK, feel free to ping me anytime after about 1800 UTC on most days-- no promises, but, if I'm available, I should be able to help with this and future assignments.