Answer:
The function prototypes are as follows:
int findSum(int fn, int sn, int tn);
int findMin(int fn, int sn, int tn);
int findMax(int fn, int sn, int tn);
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;}
Step-by-step explanation:
Given
See attachment 1 for the main function
Required
Write the following functions
The following represents the function prototypes
int findSum(int fn, int sn, int tn);
int findMin(int fn, int sn, int tn);
int findMax(int fn, int sn, int tn);
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
if(sn<=min && sn<=tn){
min = sn; }
This checks if tn is the minimum
if(tn <= min && tn <= sn){
min = tn; }
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
if(tn>=max && tn>=sn){
max = tn; }
This returns the maximum of the three numbers
return max;}
See cpp attachment for complete program which includes the main