Seperti diatas tampilan Program nya.
Buat seperti tampilan diatas yaitu :
Label, Button, dan juga Memo.
Selanjutnya Ketikan source code seperti dibawah ini, klik 2x pada button :
procedure TForm1.Button1Click(Sender: TObject); VAR BATAS,AWAL,X:INTEGER; begin Memo1.Clear; AWAL:=StrToInt(Edit1.Text); BATAS:=StrToInt(Edit2.Text); X:=AWAL; WHILE X < BATAS DO BEGIN X:=X+1; Memo1.Lines.Add(IntToStr(X)); END; end; |
Komentar
Posting Komentar