Jangan berhenti berupaya ketika menemui kegagalan. Karena kegagalan adalah cara Tuhan mengajari kita tentang arti kesungguhan.

Senin, 12 Desember 2011

Materi Pascal

program dua_dimensi;
uses wincrt;
var x: array [1..10,1..10] of real;
p,l,i,j:integer;
begin
write('Panjang = ');readln(p);
write('Lebar = ');readln(l);
writeln('Masukkan isi matriks!');
for i:=1 to l do
for j:=1 to p do
read(x[i,j]);
writeln;
writeln('Bentuk matriksnya');
for i:=1 to l do
begin
for j:=1 to p do
write(x[i,j]:3:0,' ');
writeln;
end;
writeln('Bentuk matriks transpose nya');
for j:=1 to p do
begin
for i:=1 to l do
write(x[i,j]:3:0,' ');
writeln;
end;
end.

0 komentar:

Posting Komentar