Sunday, 8 December 2013

Program Matriks Menggunakan Turbo Pascal

program Matriks;
uses wincrt;
var
   a : Array[1..10,1..10] of integer;
   baris,kolom:integer;

begin
    write('jumlah baris : ');readln(baris);
    write('jumlah kolom : ');readln(kolom);

    for baris:=1 to baris do
    for kolom:=1 to kolom do
        begin
             write('[',baris,',',kolom,'] = ');readln(a[baris,kolom]);
        end;

    writeln;
    writeln('Matrix yang terbentuk adalah : ');
    for baris:=1 to baris do
        begin
             for kolom:=1 to kolom do
                 begin
                      write(a[baris,kolom]);
                      write(' ');

                 end;
                 writeln;
        end;

end.

Tampilan Program :

image

Semoga Bermanfaat Smile

0 comments:

Post a Comment