Program matriz ;
var M,M2,M3: array [1..4,1..4] of integer; 
    i,j: integer;
    
 Begin
  writeln('Matriz 1');
  for i:=1 to 4 do
   for j:=1 to 4 do
    begin
    write ('M[',i,',',j,']: ');
    readln (M[i,j]); 
    end;
    for i:=1 to 4 do
  begin
    for j:=1 to 4 do
    write (M[i,j]:+3,'  ');
    writeln;
  end;
   writeln;
   writeln ('Matriz 2');
   for i:=1 to 4 do
   for j:=1 to 4 do
    begin
    write ('M2[',i,',',j,']: ');
    readln (M2[i,j]); 
    end;
  
    for i:=1 to 4 do
  begin
    for j:=1 to 4 do
    write (M2[i,j]:-3,'  ');
    writeln;
  end;  
  writeln('Matriz 3=Matriz 1 + Matriz 2');
   for i:=1 to 4 do
  begin
   for j:=1 to 4 do
   M3[i,j]:=M[i,j]+M2[i,j];
  end;
  writeln;    
    for i:=1 to 4 do
  begin
    for j:=1 to 4 do
    write (M3[i,j]:-3,'  ');
    writeln;
  end;    
   
 End.
