1. . Standart , , , Edit.
:
a) Edit1.
b) Properties ().
c) Text Edit1 0, , .
Edit1 ( Name ) ( Text). , , .
:
a) Name.
b) Edit1 Number1.
2. , Number2 0.
3. , , , . Label.
Label1 Caption . . , Label1 AutoSize ( ). , AutoSize, True False.
4. , . Button , Label1, , , TotalButton ( Name), ">" ( Caption).
TotalButton. , , , , , .
5. . Num1 Num2 :
int Num1, Num2;
6. Result, :
int Result;
7. Name TEdit ( Edit) . , , "100", 100, : StrToInt().
StrToInt Number1. Number1->Text, , StrToInt :
|
|
StrToInt (Number1->Text)
Num1 , StrToInt(). , , :
Num1 = StrToInt (Number1->Text);
8. Num2 :
Num2 = StrToInt (Number2->Text);
9. Num1 Num2 Result :
Result = Num1 * Num2;
10. .
Result , Caption . IntToStr(), , :
Label1->Caption = IntToStr (Result);
:
{
int Num1, Num2;
int Result;
Num1 = StrToInt (Number1->Text);
Num2 = StrToInt (Number2->Text);
Result = Num1 * Num2;
Label1->Caption = IntToStr (Result);
}
. .OBJ. . , Calc.cpp Calc.obj. . Calc.exe.
, . , .
, , .