Question: a) Write a suitable C function to satisfy the following: i. The name of the function is community. ii. When it is called, it

a) Write a suitable C function to satisfy the following: i. The name of the function is community. ii. When it is called, it will return a floating point number. iii. The function would accept 3 integer numbers, num1, num2, and num3. iv. The algorithm for the function is as below: 1. If num1 and num2 are equals, the function will return num3. [5 m] 2. If num1 is greater than num2, the function will return num1 * num2 - num3. 3. If num1 is less than num2, and num3 is not equal to zero, the function will return floating point value of (num1 + num2) num3, otherwise it will print "sorry, division by zero" and return 0.0
Step by Step Solution
There are 3 Steps involved in it
Heres a C function named community that satisfies the given requirements c include stdio h float com... View full answer
Get step-by-step solutions from verified subject matter experts
