You are on page 1of 1

Private Sub btnTra_Click() Dim Xebus(1 To 60) As String Dim i As Integer Xebus(1) = "HaDong-LongBien" Xebus(2) = "HaDong-GiaLam" Xebus(3) = "GiaLam-GiapBat"

Xebus(16) = "GiapBat-MyDinh" Xebus(30) = "MyDinh-CauGiay-MaiDong" Xebus(7) = "CauGiay-NoiBai" txtKQ.Text = "Ket Qua Tra Cuu :" For i = 1 To 60 If InStr(UCase(Xebus(i)), UCase(txtInput.Text)) <> 0 Then txtKQ.Text = txtKQ.Text & vbCrLf & " So Xe : " & i & vbCrLf & " Lo Trinh :" & Xebus(i) End If Next End Sub "tim nghiem gan dung " Private Sub btnGiai_Click() Dim X1, X2, TG As Double Dim i As Integer X1 = CDbl(txtBandau.Text) i = 0 Do i = i + 1 X2 = X1 TG = 5 * X1 - 1 If TG < 0 Then X1 = -Abs(TG) ^ (1 / 5) Else X1 = (TG) ^ (1 / 5) End If Loop Until Abs(X2 - X1) < CDbl(txtSaiso.Text) MsgBox "nghiem gan dung la X= " & X1 & " so lan lap : " & i End Sub

You might also like