/* xzdfgh
dafhad */
program SubPrg {

Declarations

	/* dfsfh */
	a := 4, b:= 5, c:= 5, xn := 10 -> Integer;
	/* dfzgdf */
	d := [10,20,30,40], ev -> array size 4;


	subProgram calculate() :: integer
	{
	  Declarations
		fac := 6, xn := 4 -> integer;
		res := -16 -> integer;

		subprogram factorial(n -> integer; m -> array size 4) :: integer
			{
			  Declarations
				res := 1 -> integer;
			  Statements
				while (n > 0)
				{
					res = res * n;
					n = n -1;
				}
    /*
  writeLn(xn);
	writeLn(xn);
	writeLn(xn);
     writeLn(xn);
        writeLn(xn);
	*/
				for (a in 0..3) stepup 1
				{
				  d[a] = a*res;
				}
			return res; 
			}
	  Statements
		res = factorial(fac,d);
		return res/2;
	}

/*dfhdsf */
Statements

writeLn(xn);

/* aehadh */
writeLn(xn);
writeLn(xn);
	a = calculate();
	writeLn(a);
	writeLn(d);
}

