.


:




:

































 

 

 

 





( If)

Private Sub Command1_Click()

Dim x As Double '

Dim y As Double '

Const R = 2

x = CDbl(Text1.Text)

If x < R Then

y = x + R

ElseIf x > R Then

y = 1

Else

y = Sqr(R ^ 2 x ^ 2)

End If

Label1.Caption = CStr(y)

End Sub


( Select Case)

Private Sub Command1_Click()

Dim x As Double '

Dim y As Double '

Const R = 2

x = CDbl(Text1.Text)

Select Case x

Case Is < R

y = x + R

Case R To R

y = Sqr(R ^ 2 x ^ 2)

Case Is > R

y = 1

End Select

Label1.Caption = CStr(y)

End Sub

 

1. If (If End If, If Else End If, If ElseIf Else End If).

2. Select Case.

3. Boolean .

4. .

5. .


3

: For.

 

.

. :

For < > = < > To < > [ Step < >]

< >

Next [ ]

. 4.

 

 

. 4.

 

For:

1) ().

2) : () ( ) ( ). , . , (. . ).

3) < > ( , 1).

4) 2

Print.

Print x, y x y, Print =, S =, , S.

1. For , . x , .

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

18.

19.

20.

21.

22.

23.

24.

25.

 

2. , , 2:





:


: 2017-02-25; !; : 401 |


:

:

80% - .
==> ...

1536 - | 1386 -


© 2015-2024 lektsii.org - -

: 0.014 .