Question: In C code Write the function definition for a function called FindQuo that takes two arguments of type double (arg1 and arg2) and returns a
In C code
Write the function definition for a function called FindQuo that takes two arguments of type double (arg1 and arg2) and returns a double. The purpose of the function is to calculate the quotient of arg1 divided by arg2. The function will also let the user know (print a message) if the result is positive or negative. The function will also not allow divide by 0.
1. If arg2 is a 0, return 0.0.
2. if both arg1 and arg2 are positive values, print the message "the result will be positive" , divide arg1 by arg2 and return the result
3. if both arg1 and arg2 are negative values, print the message "the result will be positive" , divide arg1 by arg2 and return the result
4. If arg1 is negative and arg2 is positive, print the message "the result will be negative" , divide arg1 by arg2 and return the result
5. If arg2 is negative and arg1 is positive, print the message "the result will be negative" , divide arg1 by arg2 and return the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
