c++ homework problem
Write, test, and debug a program that sorts a list of 4 different values integer values input by the user – using the guidelines and sample output below.
Your main() function will call an input function (to input the numbers), a sorting function (to sort the numbers), and output function (to display the results sorted numbers). Accordingly passing any values as needed between all functions.
Write one input function to input one number, returning that value via the return statement to the calling function. You will need to call this function 4 times to get all 4 values. (no reference parameters, pass by value parameters are okay, int function type).
Write a sort function that sorts the 4 numbers from least to greatest. You may want to also use the swap function at the end of 9/16/2015 lecture to help. (must use reference parameters, no pass by value parameters, void function type)
Write an output function to display the numbers sorted. (pasa by value parameters, void function type)
10 years ago 40
Answer(1)
Purchase the answer to view it
NOT RATED
- code_sorting.docx
- screen_shots_2.docx
Bids(1)
other Questions(10)
- com285 Wk1_Communication
- BSHS_325_BullyingReport_NicoleThompson
- FAU QBM 360 - Quiz 2
- government paper read below for assignment
- break even
- Are restaurants where you live required to provide visible calorie information under current regulations?
- pslides
- Africa assignment 4 JosephBrown
- Which of the following is the best example of a major dispute during the Constitutional Convention? the House of Representatives vs. the Senate the...
- Principles of Macroeconomics