Question: Could you guys fill in the missing code, these are the errors MODULE mdCalc; IMPORT In, Out; VAR d: ARRAY 100 OF REAL; n: INTEGER;

Could you guys fill in the missing code, these are the errors

Could you guys fill in the missing code, these are the errors

MODULE mdCalc; IMPORT In, Out; VAR d: ARRAY 100 OF REAL; n: INTEGER; v: REAL;

PROCEDURE mdev( x: ARRAY OF REAL; n: INTEGER): REAL; VAR

PROCEDURE mean( x: ARRAY OF REAL; n: INTEGER): REAL; VAR

BEGIN (* mean *)

RETURN m END mean;

BEGIN (* mdev *)

RETURN md END mdev;

BEGIN (* mdCalc *) n := -1; In.Real( v); WHILE In.Done DO (* exit loop with cntrl-D *) INC( n); d[ n] := v; In.Real( v) END; INC( n); (* so n is now the size of the array *) Out.Real( mdev( d, n)); Out.Ln END mdCalc.

"mdCalc.m", line 20: 'm' has not been declared RETURN m A "mdCalc.m", line 25: 'md' has not been declared RETURN md AA "mdCalc.m", line 14: warning -- mean is declared but not used PROCEDURE mean( x: ARRAY OF REAL; AAAA

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!