Question: 5 . 1 1 LAB: User - Defined Functions: Max and min numbers Define a function named LargestNumber that takes three integers as parameters and

5.11 LAB: User-Defined Functions: Max and min numbers
Define a function named LargestNumber that takes three integers as parameters and returns the largest integer. Define a second function named SmallestNumber that takes three integers as parameters and returns the smallest integer. Then, write a main program that reads three integers as inputs, calls functions LargestNumber() and SmallestNumber() with the inputs as arguments, and outputs the largest and the smallest of the three input values.
Ex: If the input is:
\(7\quad 15\quad 3\)
the output is:
```
largest: 15
smallest: 3
```
Your program should define and call two functions:
Function LargestNumber(integer num1, integer num2, integer num3) returns integer largestNum
Function SmallestNumber(integer num1, integer num2, integer num3) returns integer smallestNum
5 . 1 1 LAB: User - Defined Functions: Max and

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!