Matriks Identitas

Posted: 10 Mei 2010 in Algoritma Pemrograman

>Syntax program matriks identitas dengan pascal:

Program Matriks_Identitas;
uses wincrt;
type
data = array[1..20,1..20] of integer;
var
matrik : data;
i,j : integer;
barkom : integer;
procedure identitas;
begin
writeln(‘ Penentuan ORDO MATRIKS (N x N)’);
write(‘Masukkan ordo matrik = ‘);readln(barkom);
clrscr;
for i:=1 to barkom do
for j:=1 to barkom do
begin
if i=j then
begin
gotoxy(j*5,i*3);
writeln(‘1’);
end
else
begin
gotoxy(j*5,i*3);
writeln(‘0’);
end;
end;
end;
begin
identitas;
end.


syntax pascal klik disini.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s