Pages

Jumat, 09 Desember 2011

Program matrik transpose

program dimensi;
uses wincrt;
var
x:array[1..100,1..100]of integer;
p,l,i,j:integer;
begin
write('p= ');readln(p);
write('l= ');readln(l);
for i:=1 to l do
for j:=1 to p do
readln(x[i,j]);
writeln;
writeln('Bentuk Matriknya');
for i:=1 to l do
begin
for j:=1 to p do
write (x[i,j],' ') ;
writeln;
end;


writeln('Bentuk Matrik transposenya');
for i:=1 to p do
begin
for j:=1 to l do
write (x[j,i],' ') ;
writeln;
end;
end.

Tidak ada komentar:

Posting Komentar