Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the function prototype for each function described below by writing the fu

ID: 3807144 • Letter: W

Question

Write the function prototype for each function described below by writing the function's return type and input parameters list. Do not implement the body of the function. Use the example call to the function to help you write the prototype. To receive full credit, use data types that best describe the function's use and specify input parameters to be pass by reference only when necessary. a) The function display_factors displays the factors of a whole number in either increasing or decreasing order The value 'i' denotes displaying the factors in increasing order and 'd' denotes displaying factors in decreasing order. Here is an example call to the function to display the factors of 12 in increasing order: int main O { cout

Explanation / Answer

Function #1

Prototype:

void display_factors(char, int)

                the first argument char indicates to print the factors in increasing/decreasing order.

                the second argument int indicates the number to determine the factors of it.

Function #2

Prototype:

int is_scalene(int, int, int, double)

                this function being used in an IF condition, it will print the area only if the condition is true , Hence the return type should be an int and in this case the value is 1.