where are the variables which you declared in function ?

PROCEDURE Compute_Surface_Area (VAR Radius, Surface_area_of_cylinder, Length:

you miss ) in the end of this.

calling procedure :

name(variables);

I am trying to make this code work and am having difficulty.

How do you pass the parameters? I moved the writeln and readln out of the procedure down to the main body of the program so that it will prompt for the variable entry by the user, then pass it to the procedures, but I'm getting erros.

This is what I have so far:

PROGRAM Computes (Volume, Surface_Area);

CONST

Pi = 3.142;

VAR

Radius, Length, Cylinder_Vol, Cylinder_Surf:

Real;

PROCEDURE Compute_Volume

(VAR Radius, Length, Cylinder_Vol:

Real);

BEGIN

Cylinder_Vol := Pi * Radius * Radius * Length;

Writeln(‘Cylinder_Vol: ‘, Cylinder_Vol);

Realn();

END;

PROCEDURE Compute_Surface

(VAR Radius, Length, Cylinder_Surf:

Real);

BEGIN

(* Writeln(‘Enter the radius of the cylinder.’);

Readln(Radius);

Writeln(‘Enter the length of the cylinder.’);

Readln(Length); *)

Cylinder_Surf := 2 * Pi * Radius * (Length + Radius);

Writeln(‘The surface area of the cylinder is: ‘, Cylinder_Surf);

Readln();

END;

BEGIN //main program Computes

Writeln(‘Enter the radius of the cylinder.’);

Readln(Radius);

Writeln(‘Enter the length of the cylinder.’);

Readln(Length);

Compute_Volume( Radius, Length );

Compute_Surface( Radius, Length );

END.