Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago