Tekil Mesaj gösterimi
Alt 11 Mart 2015, 10:37   #1
Çevrimiçi
Kaf_Dağı Doğrulanmış Üye
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Hesap Makinası




Hesap Makinası

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
procedure TForm1.Rakamlar(Sender: TObject); begin if sonuclandi then edit1.Text:=(sender as TButton).Caption else edit1.Text:=edit1.Text + (sender as TButton).Caption; sonuclandi:=False; end; procedure TForm1.Button5Click(Sender: TObject); begin if Length(Edit1.Text) > 0 Then if Copy(Edit1.Text,1,1)='-' Then Edit1.Text:=Copy(Edit1.Text,2,1000) else Edit1.Text:='-'+ Copy(Edit1.Text,1,1000); end; procedure TForm1.Button13Click(Sender: TObject); begin if Pos(',',Edit1.Text)=0 Then if Length(Edit1.Text)=0 Then Edit1.Text:= '0,' else Edit1.Text:=Edit1.Text + ','; end; procedure TForm1.Button26Click(Sender: TObject); begin Edit1.Text:=''; end; procedure TForm1.Button25Click(Sender: TObject); begin if Length(Edit1.Text) > 0 then Edit1.Text:=Copy(Edit1.Text,1,Length(Edit1.Text)-1); end; procedure TForm1.Hafiza_Islemleri(Sender: TObject); begin if Length (Edit1.Text) > 0 Then Edit1.Text:='0'; If(sender as TButton).Caption='MC' Then hafiza:=0; If(sender as TButton).Caption='M+' Then hafiza:=hafiza+StrToFloat(Edit1.Text); If(sender as TButton).Caption='M-' Then hafiza:=hafiza-StrToFloat(Edit1.Text); If(sender as TButton).Caption='MR' Then sonuclandi:=True; end; procedure TForm1.Dort_Islem(Sender: TObject); begin islem:=(sender as TButton).Caption; if Length(Edit1.Text) = 0 Then Edit1.Text:='0'; sayi1:=StrToFloat(Edit1.Text);sonuclandi:=true; end; procedure TForm1.Button21Click(Sender: TObject); var sonuc:double; begin sayi2:=StrToFloat(Edit1.Text); case islem[1] of '+': sonuc := sayi1 + sayi2; '-': sonuc := sayi1 - sayi2; '*': sonuc := sayi1 * sayi2; '/': Begin if sayi2 = 0 Then exit; sonuc := sayi1 / sayi2; End; end; sonuclandi:=true; Edit1.Text:=FloatToStr(sonuc); sayi1:=sayi2; end; procedure TForm1.Islem_Yap_2(Sender: TObject); var sayi:double; begin if Length(Edit1.Text) = 0 Then Edit1.Text:='0'; sayi:=StrToFloat(Edit1.Text); if (sender as TButton).Caption='Kök' Then if (sayi >= 0) Then Edit1.Text:=FloatToStr(sqrt(sayi)); if (sender as TButton).Caption='Kare' Then Edit1.Text:=FloatToStr(sayi*sayi); if (sender as TButton).Caption='1/X' Then if (sayi <> 0)Then Edit1.Text:=FloatTostr(1/sayi); sonuclandi:=true; end; procedure TForm1.FormCreate(Sender: TObject); begin Self.Caption:='Bizim Hesap Makinesi'; Edit1.Text:=''; islem:=''; end; end.


__________________
SusKun ve Sessiz Mürekkep...


Kullanıcı imzalarındaki bağlantı ve resimleri görebilmek için en az 20 mesaja sahip olmanız gerekir ya da üye girişi yapmanız gerekir.

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklamver bizimmekan