Q2) Write a C function called SortTriple that has three integers parameters namely, low, mid, and high. After executing the function SortTriple the function will swap the values of the three parameters so that low store the smallest value of the three values, high stores the biggest value of the three values, and mid store the middle value of the three values. Q3) Write a main function to test your SortTriple will ask the user to enter the three values, then uses SortTriple to reorder the values if required. The main function should print the value in the correct order and a message to indicate if the values were in the correct order or not. Sample Input/output please enter the low value: 7 please enter the mid value: 2
Q2) Write a C function called SortTriple that has three integers parameters namely, low, mid, and high. After executing the function SortTriple the function will swap the values of the three parameters so that low store the smallest value of the three values, high stores the biggest value of the three values, and mid store the middle value of the three values. Q3) Write a main function to test your SortTriple will ask the user to enter the three values, then uses SortTriple to reorder the values if required. The main function should print the value in the correct order and a message to indicate if the values were in the correct order or not. Sample Input/output please enter the low value: 7 please enter the mid value: 2
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false:
a. To use a predefined function in a program, you...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr