Answer:
The function prototypes are as follows:
<em>int findSum(int fn, int sn, int tn);</em>
<em>int findMin(int fn, int sn, int tn);</em>
<em>int findMax(int fn, int sn, int tn);</em>
The functions are as follows:
int findSum(int fn, int sn, int tn){
return fn+sn+tn;}
int findMin(int fn, int sn, int tn){
int min = fn;
if(sn<=min && sn<=tn){
min = sn; }
if(tn <= min && tn <= sn){
min = tn; }
return min;}
int findMax(int fn, int sn, int tn){
int max = fn;
if(sn>=max && sn>=tn){
max = sn; }
if(tn>=max && tn>=sn){
max = tn; }
return max;}
Explanation:
Given
See attachment 1 for the main function
Required
Write the following functions
The following represents the function prototypes
<em>int findSum(int fn, int sn, int tn);</em>
<em>int findMin(int fn, int sn, int tn);</em>
<em>int findMax(int fn, int sn, int tn);</em>
This declares the findSum function
int findSum(int fn, int sn, int tn){
This returns the sum of the three numbers
return fn+sn+tn;}
This declares the findMin function
int findMin(int fn, int sn, int tn){
This initialzes min (i.e. minumum) to fn
int min = fn;
This checks if sn is the minimum
<em> if(sn<=min && sn<=tn){</em>
<em> min = sn; }</em>
This checks if tn is the minimum
<em> if(tn <= min && tn <= sn){</em>
<em> min = tn; }</em>
This returns the minimum of the three numbers
return min;}
This declares the findMax function
int findMax(int fn, int sn, int tn){
This initialzes max (i.e. maximum) to fn
int max = fn;
This checks if sn is the maximum
if(sn>=max && sn>=tn){
max = sn; }
This checks if tn is the maximum
<em> if(tn>=max && tn>=sn){</em>
<em> max = tn; }</em>
This returns the maximum of the three numbers
return max;}
<em>See cpp attachment for complete program which includes the main</em>