Question: Implement a void function void putInOrder ( int &b , int &c , int &d ) ; that rearranges the values in b , c

Implement a void function void putInOrder(int &b, int &c, int &d); that rearranges the values in b, c and d so they are in ascending order. That means b will contain the smallest of the three values, c will contain the middle value and d will contain the biggest of the three values. You may call the built in function swap. (Hint: Three swaps are needed!)explain why reference parameters are used for the three parameters.

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 Programming Questions!