.


:




:

































 

 

 

 


[3, 3] 0,2. .




[2, 2] ( 0,1) , , , .

1

(1)

x , y .

cos(x), cos(2 x), . ., cos(99 x).

(1)

; ; ;.;

,

, ; .

For 1 99 1.

 

Private Sub Command1_Click()

Dim x As Double '

x = 0.01

Dim i As Byte '

Dim y As Double '

y = 0

For i = 1 To 99

y = Sqr(Abs(Sin(i * x) + y))

Next i

Print y

End Sub

 

2

, , f, .

Function f(x As Double) As Double

Const R = 2

Select Case x

Case Is < R

f = x + R

Case -R To R

f = Sqr(R ^ 2 x ^ 2)

Case Is > R

f = 2

End Select

End Function

 

Private Sub Command1_Click()

Dim x As Double

Dim y As Double

Dim found As Boolean .

For x = 3 To 3 Step 0.2

y = f(x)

Print Round(x, 2), Round(y, 5) x,

y

Next x


found = False

For x = 2 To 2 Step 0.1

y=f(x)

If y < 0 Then

found = True

Print " . ", Round (x, 1), y

Exit For

End If

Next x

If Not found Then Print " "

End Sub

 

1. For .

2. .

3. . .

4. .

 


4

 

-

 

: c - .

 

Do Loop For , , .

Do Loop:

- :

Do While|Until < >

< >

[Exit Do]

[< >]

Loop

- :

Do

< >

[Exit Do]

[< >]

Loop While | Until < >

While . 5.

. True, Do Loop While , False, Loop.





:


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


:

:

, - , ; , - .
==> ...

1759 - | 1751 -


© 2015-2024 lektsii.org - -

: 0.014 .