I am new to programming and do not know how to go about starting to write this program.
Write a program that will sort values – both integer and double
• Ask user to input how many elements need to be sorted (this number will
work as the array size)
• Ask user to input what datatype to sort – either integer or double
o If the user puts anything other than integer or double, show message
– “invalid datatype. Please choose between integer and double”. Then
keep running the prompt until an appropriate input is given
o Based on the size given, ask user to give that many numbers and store
it in an array (unsortedNumbers).
• Use function overloading while defining your sort function. The array
(unsortedNumbers) should be passed as the argument of both of your
Any help would be appreciated
How to go about writing a sorting program
Post a Reply
|Oldest Newest Rating|
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|