Advertisement
tiskowdaknife

Untitled

Oct 22nd, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. 'фак. №5349
  2. 'двоен корен --> 3
  3. 'два корена --> 5, 9
  4.  
  5. Dim root1 As Double = 5
  6. Dim root2 As Double = 9
  7. Dim x As Double
  8.  
  9. x = 0
  10.  
  11. Select Case x
  12. Case root1
  13. Console.WriteLine("x is a root of the quadratic equation.")
  14. Case root2
  15. Console.WriteLine("x is a root of the quadratic equation.")
  16. Case Else
  17. Dim result As Double = (x ^ 2) - ((root1 + root2) * x) + (root1 * root2)
  18. Console.WriteLine("The result of the quadratic equation for x is: " & result)
  19. End Select
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement