Question: a) Write a suitable C function to satisfy the following: [5 m] i. The name of the function is community. ii. When it is called,
a) Write a suitable C function to satisfy the following: [5 m] 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, num], num2, and num3. iv. The algorithm for the function is as below: 1. If num1 and num2 are equals, the function will return num3. 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 (numl + 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
Get step-by-step solutions from verified subject matter experts
