Question: In this assignment, you will create a program in C to sort numbers input by users. 1) The program will keep prompting user to input

 In this assignment, you will create a program in C to

In this assignment, you will create a program in C to sort numbers input by users. 1) The program will keep prompting user to input a number until a 0 is given or 10 numbers are given, 2) The program prints a sorted list of the numbers given by the user, in increasing order. If no number is 3) You must use the quicksort algorithm for sorting. The C file for the quicksort algorithm is provided General Requirements whichever comes first. The number 0 is not part of the input. given by the user, the program prints a message "No number is given." and exits. To use the quicksort function, you need to declare the signature of the function before the mainO function. void quicksort(int arr[ int mainO int low, int high) 4) To compile your code with gcc, use the command as follows quicksort,c %gcc You may use any systems or tools to create and run your program. However, your program must run correctly on a departmental Linux computer Please follow the guidelines in the programming guideline document. A sample run of the program is as follows: yongjianassign2.c 5) 6) 7) turi ng2:-/assign2 % ./a.out This program will accept up to ten numbers and sort them Please enter a number. Enter 0 to exit: 2 Please enter a number. Enter 0 to exit: 4 Please enter a number. Enter 0 to exit: -2 Please enter a number. Enter 0 to exit: 0 The sorted list of numbers: -2, 2, 4 8) Test your program with various input, e.g, with 0, 1, 2, and 10 input numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!