.


:




:

































 

 

 

 


.




2) , , , .

3) .

4) .

5) , :

5.1) ;

5.2) ;

5.3) ;

5.4) .

6) .

7) .

 

 

 

1) :

.

.

2) , , , :

., 1405, 13.

3) :

-4 r=f(x, y, z):

4) :

() . , , If.

Razv(), , x, y, z, r n. vivod() r (Double) n (Integer), .. , Overloads.

5) , :

5.1) :

, . 4.4.5-1.

 

. 4.4.5-1. 4-1:
.

5.2) :

. 4.4.5-2 .

 

4.4.5-2

.4-2
Form1 Name Form1
Text   :
Label1 Text   r=f(x,y,z)
ImageAlign MiddleCenter
Label2 Text   X=
ImageAlign MiddleCenter
Label3 Text Y=
Label4 Text Z=
Label5 Text R=
TextBox1 Name TextBox1
TextBox2 Name TextBox2
TextBox3 Name TextBox3
TextBox4 Name TextBox4
Button1 Name Button1
Text r=f(x, y, z)
Button2 Name Button2
Text

 

5.3) :

Razv() . 4.4.5-2.

 

. 4.4.5-2. Razv() 4-1:

5.4) . 4.4.5-3.

 

Imports System.Math Public Class Form1 ' TextBox Function vvod(ByVal T As TextBox) As Double Return Val(T.Text) End Function ' . TextBox Overloads Sub vivod(ByVal Z As Double, ByVal T As TextBox) T.Text = CStr(Z) End Sub ' TextBox Overloads Sub vivod(ByVal Z As Integer, ByVal T As TextBox) T.Text = CStr(Z) End Sub Sub Razv(ByVal x As Double, ByVal y As Double, _ ByVal z As Double, ByRef r As Double,ByRef n As Integer) Dim r1, r2 As Double If y < x Then r1 = Sin(y): r2 = Cos(z) r = x ^ 2 If r1 < r Then r = r1 End If If r2 < r Then r = r2 End If n = 1 '1 . - ElseIf y <= z Then r1 = Log(z ^ 2): r2 = Exp(x + y) If r1 > r2 Then r = r1 Else r = r2 End If n = 2 '2 . - Else r = x + y + z n = 3 '3 . - End If End Sub Private Sub Button1_Click(sender As Object,e As EventArgs) _ Handles Button1.Click Dim x, y, z, r As Double Dim n As Integer x = vvod(TextBox1): y = vvod(TextBox2):z = vvod(TextBox3) Razv(x, y, z, r, n) vivod(r, TextBox4): vivod(n, TextBox5) End Sub Private Sub Button2_Click(sender As Object,e As EventArgs) _ Handles Button2.Click End End Sub End Class

 

. .1.4-3. 4-1:

.

 

. 4.4.5-4.

 

. 4.4.5-4. 4-1:

 





:


: 2016-11-18; !; : 466 |


:

:

! . .
==> ...

1531 - | 1325 -


© 2015-2024 lektsii.org - -

: 0.009 .