Program matriz ;
var mat1:array[1..4,1..4]of integer;i,j:integer;mat2:array[1..4,1..4]of integer;mat3:array[1..4,1..4]of integer;
 Begin
  for i:=1 to 4 do
  	for j:=1 to 4 do
  	  begin
  		write('mat1[',i,',',j,']');
  		readln(mat1[i,j]);
  	  end;
  clrscr;
  for i:=1 to 4 do
  	begin
  		for j:=1 to 4 do
	  		write(mat1[i,j],' ');
		writeln(' ');
	end;
  readkey;
  clrscr;
  for i:=1 to 4 do
  	for j:=1 to 4 do
   		begin
  			write('mat2[',i,',',j,']');
  			readln(mat2[i,j]);
  	  	end;
  clrscr;
  for i:=1 to 4 do
     begin
  		for j:=1 to 4 do
	  		write(mat2[i,j],' ');
		writeln(' ');
	end;
  readkey;
  clrscr;
  writeln('Soma das matrizes');
  for i:=1 to 4 do
   begin
  	for j:=1 to 4 do
  		begin
   		 	mat3[i,j]:=mat1[i,j]+mat2[i,j];
   		 	write(mat3[i,j]:3);
   		end;
   	writeln(' ');
   end;  	
 End.
