.


:




:

































 

 

 

 


IF




 

Private Sub CommandButton1_Click()

x = InputBox("x-?")

If x >= -5 And x <= 10 Then

If x < 0 Then

y = 1.5 * x + 4

ElseIf x < 10 And x >= 5 Then

y = -x ^ 5 + x ^ 4 - x ^ 3 - 2

Else

Sin (x + 2) / (10 - x)

End If

MsgBox "y=" & y

 

Else

MsgBox " "

End If

End Sub

x=11 y-

x=1 y=1.568*10^(-2)

x=-1 y=2.5

x=5 y=-2627

 

 

[1;5] 8 , 9

 

Worksheets("ëèñò3").Activate

Cells.Clear

XN = Val(TextBox1.Text)

XK = Val(TextBox2.Text)

N = Val(TextBox3.Text)

dX = (XK - XN) / N

stroka = 1

For x = XN To XK Step dX

y = Log(2 + 2 * x) / (x - 0.1)

Cells(stroka, 1) = x

Cells(stroka, 2) = y

stroka = stroka + 1

Next x

 

 

 

 

for, next

1) 4 :

- gamma ( )

-

 

Dim i As Integer, b As Single

Open "C:\Documents and Settings\student\ \\primer.txt" For Output As #1

 

For i = 1 To 4

b = InputBox("-")

y = Abs(Tan(b))

Print #1, "="; Format(b, "0.000")

Print #1, "="; Format(y, "0.000")

Next i

 

 

 

2)

S=Tan(11*gamma)+Tan(9*gamma)++Tan(gamma)

gamma=0.12

 

Dim p As Single, k As Integer, gamma As Single

gamma = 0.12

p = 0

For k = 11 To 1 Step -2

p = p + Tan(k * gamma)

Next k

MsgBox "S=" & p

 

 

 

Dim integral As Double, x As Double

Dim a As Double, b As Double, dx As Double

Dim n As Integer

a = Val(TextBox1.Text)

b = Val(TextBox2.Text)

n = Val(TextBox3.Text)

dx = (b - a) / n

integral = 0

 

For x = a To b - dx Step dx

integral = integral + (2 * x ^ 2 + 5 * x)

Next x

 

integral = integral * dx

 

Label6.Caption = Format(integral, "0.000")

Label7.Caption = 566.1

 

 

 

0.1 0.05

 

Dim h As Double, s As Double, n As Double, i As Integer

a = 1

b = 2

h = Val(TextBox1.Text)

s = Val(TextBox2.Text)

n = (b - a) / h + 1

Worksheets("1").Activate

i = 0

x = 1

y = 2

Cells(s, 1) = x

Cells(s + 1, 1) = y

For i = 0 To n - 2

y = y + h * (-x * y - x ^ 4)

x = x + h

Cells(s, i + 2) = x

Cells(s + 1, i + 2) = y

Next i

 

 


While

S = 1+2*x+3*x2.

 

Private Sub CommandButton1_Click()

Dim s As Double

Dim s1 As Double

Dim x As Double

 

x = Val(TextBox1.Text)

F = 1 / (1 - x) ^ 2

Label8.Caption = Format(F, "#0.000000")

 

n = Val(TextBox2.Text)

s = 1

k = 2

t = 1

slag1 = k * x ^ t

 

For i = 1 To n

s = s + slag1

k = k + 1

t = t + 1

slag1 = k * x ^ t

Next i

Label9.Caption = Format(s, "#0.000000")

 

esp = Val(TextBox3.Text)

s1 = 1

k1 = 2

t1 = 1

slag1 = k1 * x ^ t1

While Abs(slag1) >= esp

s1 = s1 + slag1

k1 = k1 + 1

t1 = t1 + 1

slag1 = k1 * x ^ t1

 

Wend

Label10.Caption = Format(s, "#0.000000")

 

End Sub

 

Private Sub UserForm_Click()

 

End Sub

 

 

autocad 1

(_LINE)

4, .

,

 

 

 

. 5 .

 

 

(_point), (_ARC), (_MLINE) (_PLINE).

 

 





:


: 2015-11-05; !; : 736 |


:

:

80% - .
==> ...

1402 - | 1255 -


© 2015-2024 lektsii.org - -

: 0.012 .