for, , :
for ([]; []; [])
; . . . , ; , .
, . ; .
, for , .
, . for -:
int i;
for (i =0; i < REPEAT; i++)
DoSomething (i);
0. , REPEAT. i REPEAT, . i [1].
, , , - , . , ( ), for. , ( ) , while do...while.
. , , . , , . . , . :
unsigned Fac(unsigned n)
{
if (n)
return n * Fac(n - 1);
else
return 1;
}
1. [2,3] 0,1 [3].
1. : Edit1, Edit2, Edit3, Label1, Label2, Label3, Memo1, Button1, Button2.
2. :
Edit1 | Text | |
Edit2 | Text | |
Edit3 | Text | |
Label1 | Caption | A= |
Label2 | Caption | B= |
Label3 | Caption | H= |
Memo1 | Lines | |
Button1 | Caption | |
Button2 | Caption |
3. , ,
|
|
Close();
4. , :
5. .
2. : [2; 3].
1. : Edit1, Edit2, Edit3, Label1, Label2, Label3, Memo1, Button1, Button2.
2. :
Edit1 | Text | |
Edit2 | Text | |
Edit3 | Text | |
Edit4 | Text | |
Edit5 | Text | |
Label1 | Caption | A= |
Label2 | Caption | B= |
Label3 | Caption | H= |
Label4 | Caption | Max |
Label5 | Caption | Min |
Button1 | Caption | |
Button2 | Caption |
3. , ,
Close();
4. , :
5. .
:
1. ?
2. ?
3. ?
4. ?
5. ?
ex - e-x-2 = 0 | [0;1] | 0.1 | |
3sin +0.35x - 3.8 = 0 | [2;3] | 0.1 | |
x 2 +sin(1/x) = 0 | [1.2,2] | 0.1 | |
1 x + sinx - ln(l+x) = 0 | [0;1.5] | 0.1 | |
x2 ln(1+x) 3 = 0 | [2;3] | 0.1 | |
[0,0.85] | 0.1 | ||
Lnx x + 1.8 = 0 | [2;3] | ||
[1;2] | 0.1 | ||
x + cos(x0.52+2) = 0 | [0.5;1] | 0.05 | |
[0;1] | 0.01 | ||
[0;1] | |||
[2;4] | 0.15 | ||
[1:2] | 0.1 | ||
[0;1] | 0.1 | ||
2x-31nx-3=0 | [0.5;0.6] | 0.01 |
2. min max .