Program Matrix

program Matrix;
uses crt;
    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;
    readln;
    end.

Post a Comment

[blogger]

Author Name

Contact Form

Name

Email *

Message *

Powered by Blogger.