Answered step by step
Verified Expert Solution
Question
1 Approved Answer
any tips for resolving these errors MODULE mdCalc; IMPORT In, Out; VAR d: ARRAY 100 OF REAL; n: INTEGER; v: REAL; PROCEDURE mdev( x: ARRAY
any tips for resolving these 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; AAAAStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started