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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started