Masukkan Script berikut pada console Application delphi Anda
program nol_sebelah_kanan;
{$APPTYPE CONSOLE}
uses
SysUtils;
Var
mat:Array[1..10,1..10]of integer;
x,y:integer;
begin
writeln;
writeln('Nama : Arif Ragil Pamungkas');
writeln('Nim : 114224022');
writeln('STMIK YADIKA BANGIL'); writeln('--------------------------');
writeln('--------------------------');
writeln;
writeln(' =============================');
writeln(' MATRIK NOL DI SEBELAH KANAN');
writeln(' =============================');
writeln;
FOR x:=1 to 5 do
begin
for y:=1 to 5 do
begin
mat[x,y]:=0;
if x>=y then mat [x,y]:=x;
write(mat[x,y]:5);
end;
writeln;
end;
Readln;
end.
Dan Hasilnya sebagai Berikut
0 komentar:
Posting Komentar