
{
PROGRAMMED BY   : MOHAMMAD ALJADA
DOWNLOADED FROM : WWW.GEOCITIES.COM/MOHJADA
PROGRAM         : Procedures
}

uses wincrt;
VAR X:INTEGER;


PROCEDURE INC1(x:INTEGER);
BEGIN
x:=x+1;
WRITELN('INC 1 VALUE (FUN):',x);
END;

PROCEDURE INC2(var x:INTEGER);
BEGIN
x:=x+1;
WRITELN('INC 2 VALUE (FUN):',x);
END;

FUNCTION POW1(X:INTEGER):INTEGER;
BEGIN
INC2(X);
POW1:=X*X;
END;

FUNCTION POW2(VAR X:INTEGER):INTEGER;
BEGIN
POW2:=X*X;
INC2(X);
END;

BEGIN
X:=1;
INC1(X);
WRITELN('INC 1 VALUE (MAN):',X);
INC2(X);
WRITELN('INC 2 VALUE (MAN):',X);
WRITELN('POW 1 VALUE (MAN):',POW1(X));
WRITELN('POW 2 VALUE (MAN):',POW2(X));
WRITELN(X);

END.


