Algoritma Dasar Algoritma Dasar
Struktur program For :
Program ARDIANSYAH;
Uses wincrt;
Var
Baris,Kolom : Integer;
Begin
Clrscr;
For Baris:=1 to 10 do
Begin
For Kolom:=Baris to 10 do
Write (Kolom);
Writeln;
End;
End.
Akan menghasilkan Pola OUTPUT :
12345678910
2345678910
345678910
45678910
5678910
678910
78910
8910
910
10
Program ARDIANSYAH;
Uses wincrt;
Var
Baris,Kolom : Integer;
Begin
Clrscr;
For Baris:=1 to 10 do
Begin
For Kolom:=Baris to 10 do
Write (Kolom);
Writeln;
End;
End.
Akan menghasilkan Pola OUTPUT :
12345678910
2345678910
345678910
45678910
5678910
678910
78910
8910
910
10
Komentar
Posting Komentar