program Projekt_06;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a, b: Cardinal;
procedure PowerNto2;
var i,z: Cardinal; // część deklaracyjna procedury
begin              // część wykonawcza procedury
  for i:=1 to 10 do
    begin
      z:=Sqr(i);
      Writeln(i,'^2','=',z);
    end;
end;
//------------------------------------------
(*procedure Power2toN(x: Cardinal; y: Cardinal);
var
  i,z: Cardinal;
begin
  z:=1;
  for i:=1 to y do
   begin
     z:=z*x;
     Writeln('2^',i,'=',z);
   end;
end; *)
//------------------------------------------
procedure Power2toN(var x, y: Cardinal);
var
  i,z: Cardinal;
begin
  z:=1;
// np.  y:=5;
  for i:=1 to y do
   begin
     z:=z*x;
     y:=z*a;
     Writeln('2^',i,'=',z,' ',a,' ',y);
   end;
end;
begin
  a:=2; b:=10;
  Power2toN(a,b);
// np.  Writeln('b=',b);
  ReadLN;
end.

