Question: Write a program that, given three 1 - digit integer int 1 , int 2 and int 3 , arrange them into the largest 3

Write a program that, given three 1-digit integer int1, int2 and int3, arrange them into the
largest 3-digit number.
For example, input 1,2, and 3, the output should be 321; input 4,2,6, the output should
be 642.
Steps:
1) Make a function of Sort (int & x, int & y, int &z), changes the values of those
arguments so that their values are in descending order by declaring reference parameters.
2) Compute and print out the number 100*x+10*y+z that is the largest

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!