Advertisement
freonne

Aplikasi Penghitung Akar Kuadrat Sebelum Evaluasi

Apr 1st, 2023
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VisualBasic 0.30 KB | Software | 0 0
  1. Dim A, B, C, D, X1, X2 As Single
  2.  
  3. Private Sub CmdHitung_Click()
  4. A = Val(TextA.Text)
  5. B = Val(TextB.Text)
  6. C = Val(TextC.Text)
  7. D = B * B - 4 * A * C
  8. X1 = (-B + D ^ 0.5) / (2 * A)
  9. X2 = (-B - D ^ 0.5) / (2 * A)
  10. TextX1.Text = X1
  11. TextX2.Text = X2
  12. End Sub
  13.  
  14. Private Sub CmdSelesai_Click()
  15. Unload Me
  16. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement