You are on page 1of 3

y=sinx + cosx Dim x As Single Dim y As Single Private Sub Command1_Click() x = Text1.Text y = Sin(x) * Sin(x) + Cos(x) * Cos(x) Text2.

Text = y End Sub SAU Dim y As Single Dim t As Single Private Sub Command1_Click() t = Text1.Text y = 1 / 2 * (1 - Exp((-2 * t))) Text2.Text = y End Sub sadrzaj pozitivan Dim a As Single Dim b As Single Dim c As Single Private Sub Command1_Click() a = Text1.Text b = Text2.Text c = Text3.Text If a > 0 And b > 0 Then Text1.Text = Sqr(a) Text2.Text = Sqr(b) Text3.Text = c / 2 Else Text1.Text = c Text2.Text = a Text3.Text = b End If End Sub

kvadratna jed Dim a As Integer Dim b As Integer Dim c As Integer Dim x1 As Single Dim x2 As Single Private Sub Command1_Click() a = Text1.Text b = Text2.Text c = Text3.Text x1 = (-b + Sqr(b * b - 4 * a)) / (2 * a) x2 = (-b - Sqr(b * b - 4 * a)) / 2 * a Text4.Text = x1 Text5.Text = x2 End Sub \izracunati vrijed. izraza Dim x As Integer Dim y As Single Private Sub Command1_Click() x = Text1.Text y = (x ^ 3.5 - 2 * x - 0.05) / (0.1 * x * x - 1) Text2.Text = y End Sub c=nota or b Dim a As Integer Dim b As Integer Dim c As Integer Private Sub Command1_Click() a = Text1.Text b = Text2.Text If nota = 1 Or b = 1 Then c=1 Else c=0 End If Text3.Text = c End Sub

broj neparnih Dim a As Integer Dim b As Integer Private Sub Command1_Click() a = Text1.Text b = Text2.Text s=0 If a Mod 2 = 1 Then s=s+1 End If If b Mod 2 = 1 Then s=s+1 End If Text3.Text = s End Sub \and log. funk Dim a As Integer Dim b As Integer Dim y As Integer Private Sub Command1_Click() a = Text1.Text b = Text2.Text If a = 0 And b = 0 Then y=0 ElseIf a = 1 And b = 0 Then y=0 ElseIf a = 0 And b = 1 Then y=0 ElseIf a = 1 And b = 1 Then y=1 End If Text3.Text = y End Sub

You might also like