13 Ekim 2008 Pazartesi

Delphi Kodları tek Çift Bulma

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
ListBox1: TListBox;
ListBox2: TListBox;
ListBox3: TListBox;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
a,b,i,tt,ts,ct,sayac:integer;
begin
a:=strtoint(edit1.Text);
b:=strtoint(edit2.Text);
if (a>b) then showmessage ('yanlış değer girdiniz');
for i:=a to b do
begin
if (i mod 2)=0 then begin
listbox3.Items.Add(inttostr(i));
listbox1.Items.add(inttostr(i));
tt:=tt+i;
ct:=ct+i;
end;
if (i mod 2)=1 then begin;
listbox2.items.add(inttostr(i));
listbox1.Items.add(inttostr(i));
ts:=ts+i;
tt:=tt+i;
edit3.Text:=inttostr(tt);
edit5.Text:=inttostr(ct);
edit4.text:=inttostr(ts);
end;
end;
end;
end.


delphi companent ,delphi datetimepicker ,delphi opendialog,delphi toolbardelphi imagelist,free delphi,delphi link ,delphi showmessage ,borland delphi 2007 ,delphi dbedit,dede delphi ,delphi rounddelphi handle ,delphi try except ,delphi splash,delphi pos,delphi bileşen,delphi popup ,codegear delphi 2007,delphi 2007,delphi regedit ,delphi time ,delphi cd 1,delphi bileşenleri ,delphi vista,delphi 2006 ,borland delphi 2008 ,borland delphi ,delphi float ,delphi web,delphi mdi,delphi dbcombobox,delphi blog
delphi if,delphi ping ,delphi swf,delphi 5 download,delphi font,delphi not ,delphi case ,delphi uses ,delphi keylogger ,delphi test ,delphi about ,delphi registry ,delphi pagecontrol,delphi video ,delphi 2007 download ,delphi 2006 download ,delphi draw ,delphi 2008 download ,delphi keypress ,delphi tr
delphi resource,delphi client server,delphi internet,delphi download

Hiç yorum yok: