Question: For the given code find all errors in each part if any and write the correct code line next to it. Explain the error. If

For the given code find all errors in each part if any and write the correct code line next to it. Explain the error. If there are no errors write no errors. This code should find the exact average of four numbers. The output is displayed up to three digits after the decimal point.

#include

float Average(int *, *,*,*);

int main()

{

float N1,N2,N3,N3;

printf("Enter 4 values:");

scanf("%f %f %f %f",N1,N2,N3,N4);

Average( N1,N2,N3,N4);

return 0;

}

float Average(int *x, *y, *z,*w){

float x =x+y+z+w/3;

printf("The average is:%f",x);

return;

}

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!