Pages

Senin, 28 Maret 2011

LATIHAN :: MATRIKS ( PASCAL )

  • PASCAL
program matriks_input;
uses wincrt;
var i,j,m,n:integer;
x:array[1..100,1..100] of integer;
begin
writeln;
writeln ('   ====================================== ');
writeln ('             PROGRAM MATRIKS   ');
writeln ('   ====================================== ');
write ('      masukkan jumlah baris: ');readln(m);
write ('      masukkan jumlah kolom: ');readln(n);
writeln ('   ====================================== ');
for i:=1 to m do
begin
for j:=1 to n do
begin
write('         nilai[',i,',',j,']=');readln(x[i,j]);
end;
writeln;
end;
Clrscr;
writeln ('     MATRIKS ANDA  ');
writeln;
for i:=1 to m do
begin
for j:=1 to n do
write('      ',x[i,j]:5);;
writeln;

end;
end.


  • HASIL









Print Friendly and PDF

Artikel Terkait:

0 komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...