1. File/Save as File/Save Project as Unit1.cpp Project1.bpr - . , .
2. ComboBox1 Edit1 ListBox1 ListBox2:
3. Items ListBox1 :
USD
Euro
RusRuble
4. ϳ ListBox1 ( Kv), . OnClick RadioButton1 RadioButton2 :
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
int I;
Label3->Caption="";
Label7->Caption=" ";
for (I=0; I<ListBox1->Items->Count; I++)
ListBox2->Items->Add(FloatToStr(Kv[I][0]));
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
int I;
Label3->Caption="";
Label7->Caption=" ";
for (I=0; I<ListBox1->Items->Count; I++)
ListBox2->Items->Add(FloatToStr(Kv[I][1]));
}
ListBox1->Items->Count ListBox1, . ListBox2->Items->Add ( ) ListBox2. Kv Items ListBox2.
.
5. ListBox1 ListBox2 . OnClick ListBox1:
void __fastcall TForm1::ListBox1Click(TObject *Sender)
{
ListBox2->ItemIndex= ListBox1->ItemIndex;
}
() ListBox1 ListBox2 .
6. 䳿 OnChange Edit2 :
void __fastcall TForm1::Edit2Change(TObject *Sender)
{
if (RadioButton1->Checked)
Edit3->Text=FloatToStr(StrToInt(Edit2->Text)*
Kv[ListBox1->ItemIndex][0]);
else
Edit3->Text=FloatToStr(StrToInt(Edit2->Text)*
Kv[ListBox1->ItemIndex][1]);
}
7. C++ Builder. exe- Widows.