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
Get step-by-step solutions from verified subject matter experts
