//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
int tek=1,cift=0,i=1;
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
i=1;
Edit1->Text="";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
i=1;
Edit1->Text="";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
if (tek>=100)
{
i=1;
tek=0;
}
if (RadioButton1->Checked)
{
tek=2*i-1;
Edit1->Text=tek;
i++;
}
if (cift>=100)
{
cift=0;
i=1;
}
if (RadioButton2->Checked)
{
cift=2*i;
Edit1->Text=cift;
i++;
}
}
Tek Sayı Çift Sayı
Tek Sayı Çift Sayı
Konuyu Okuyanlar: 1 Ziyaretçi
![[Resim: 114ld.jpg]](http://b1112.hizliresim.com/s/c/114ld.jpg)