Question: We want to write a function called sortTwo that takes two integer parameters, and after the function is called the first parameter is the smaller
We want to write a function called sortTwo that takes two integer parameters, and after the function is called the first parameter is the smaller of the two values, and the second parameter is the larger of the two values. In other words, this is a miniature sorting function. For this problem you must supply the missing code for PARTs 1, 2, and 3 in the program below. // PART 1: function prototype int main ( ) { int x,y; scanf ( "%d %d", &x, &y ); sortTwo( ..... ); // PART 2: call the function printf ( "%d %d", x, y ); } // PART 3 - the function header and body void sortTwo ( .... ) { .... what code goes here ? .... }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
