Advertisement
Guest User

Untitled

a guest
May 29th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1.  
  2. Private Sub btn1_Click(sender As Object, e As EventArgs) Handles btn1.Click
  3. If cb1.SelectedIndex = 0 Then
  4. tb3.Text = Int(tb1.Text) + Int(tb2.Text)
  5. End If
  6.  
  7. If cb1.SelectedIndex = 1 Then
  8. tb3.Text = Int(tb1.Text) - Int(tb2.Text)
  9. End If
  10.  
  11. If cb1.SelectedIndex = 2 Then
  12. tb3.Text = Int(tb1.Text) / Int(tb2.Text)
  13. End If
  14.  
  15. If cb1.SelectedIndex = 3 Then
  16. tb3.Text = Int(tb1.Text) * Int(tb2.Text)
  17. End If
  18.  
  19. If cb1.SelectedIndex = 4 Then
  20.  
  21. End If
  22.  
  23. If cb1.SelectedIndex = 5 Then
  24. If tb1.Text = "" Then
  25. tb3.Text = Math.Sin(tb2.Text)
  26. End If
  27. Else
  28. tb3.Text = Math.Sin(tb2.Text) * Int(tb1.Text)
  29. End If
  30.  
  31. If cb1.SelectedIndex = 6 Then
  32. If tb1.Text = "" Then
  33. tb3.Text = Math.Cos(tb2.Text)
  34. End If
  35. Else
  36. tb3.Text = Math.Cos(tb2.Text) * Int(tb1.Text)
  37. End If
  38.  
  39. If cb1.SelectedIndex = 7 Then
  40. If tb1.Text = "" Then
  41. tb3.Text = Math.Tan(tb2.Text)
  42. End If
  43. Else
  44. tb3.Text = Math.Tan(tb2.Text) * Int(tb1.Text)
  45. End If
  46.  
  47. End Sub
  48. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement