0




  Source Code

uses crt;
var x,y,z : array[1 .. 100,1 .. 100] of integer;
    a,b,c : integer;

procedure input;
var i, j : integer;
begin
clrscr;
 writeln('Program matriks' );
 writeln(' ');
 write('Jumlah baris :  '); readln(a);
 write('Jumlah kolom :  '); readln(b);
 writeln;
  for i:=1 to a do
  for j:=1 to b do
   begin
    write ( 'Matriks 1 [ ' , i , ' , ' , j , ' ] : ' ) ;
    readln (x [i] [j]);
   end;
writeln;
 for i:=1 to b do
 for j:=1 to a do
  begin
   write ( 'Matriks 2 [ ' , i , ' , ' , j , ' ] : ' ) ;
   readln (y [i] [j]);
  end;
end;

procedure outputmatriks1;
var i,j:byte;
begin
  writeln;
  write('Matriks 1');
  writeln;
  for i:=1 to a do
   begin
    for j:=1 to b do
      begin
        write(' ');
        write (x [i] [j]);
        write(' ');
      end;
     writeln;
    end;
end;

procedure outputmatriks2;
var i,j:byte;
begin
  writeln;
  write('Matriks 2');
  writeln;
  for i:=1 to a do
    begin
      for j:=1 to b do
        begin
          write(' ');
          write (y[i] [j]);
          write(' ');
        end;
       writeln;
    end;
end;

BEGIN
clrscr;
 input;
 outputmatriks1;
 outputmatriks2;
readkey;
end.

Posting Komentar

 
Top