Question
Create a Sales application that prompts the user for a series of sales figures and then implements a sorting routine on the sales figures.
Output.
Enter the number of sales made today: 15
Enter the amount of sales 1:25
Enter the amount of sales 2:65
Enter the amount of sales 3:25
Enter the amount of sales 4:15
Enter the amount of sales 5:2
Sorted amounts:
2 15 25 25 65
Output.
Enter the number of sales made today: 15
Enter the amount of sales 1:25
Enter the amount of sales 2:65
Enter the amount of sales 3:25
Enter the amount of sales 4:15
Enter the amount of sales 5:2
Sorted amounts:
2 15 25 25 65
Answers
Which sorting algorithm do you plan to use?
For small number of items (less than 200),
bubble sort is easy to understand and code using for-loops.
For large number of random items, quick sort could be used, but requires the understanding of recursivity.
For small number of items (less than 200),
bubble sort is easy to understand and code using for-loops.
For large number of random items, quick sort could be used, but requires the understanding of recursivity.
Related Questions
You have the final sales figures for the four quarters in 2010 for Bennets Used Auto Sales, and you...
Create an application that determines the total due including sales tax and shipping. Allow the user...
Create the logic for a program that continuously prompts a user
for a numeric value until the user...
56. A user in the sales department calls you and complains that she is unable to log on to the serve...