Question: 1. Write a function called avg_eq() that accepts 4 doubles, a, b, c, and d and returns a 1 if the average of a,b and

 1. Write a function called avg_eq() that accepts 4 doubles, a,

1. Write a function called avg_eq() that accepts 4 doubles, a, b, c, and d and returns a 1 if the average of a,b and c is greater than d, zero otherwise. Test your code by tracing the working of it using the following main function; NOTE THAT YOU MUST ADD ANY REQUIRED \#Include STATEMENTS AND ANY NECESSARY VARIABLE DECLARATIONS IN THE MaIn. YOU MUST ALSO ADD printf STATEMENTS TO THE MAIN AFTER EACH CALL TO avg_eq TO PRINT THE RESULTS. THE OUTPUT SHOULD LOOK LIKE THAT SHOWN BELOW. Failure to add these things to the skeleton main will result in a 5 point deduction. //addincludeshere int avg_eq( double, double, double, double); //function prototype int main(void) ( //add declarations here if needed result = avg_eq (1,3,5,2);// add printf statements after each call to avg_eq to print results result = avg_eq (2,3,4,4); result = avg_eq (10,50,25,30); result = avg_eq (123,987,42,300); ) Trace your code; if correct, the output using the above inputs should be: (1,3,5,2)1(2,3,4,4)0(10,50,25,30)0(123,987,42,300)1 ------------------------------Write your function below the dotted line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!