Guest User

Untitled

a guest
Jan 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class E325 {
  3. public static void main(String[] args) {
  4. /*
  5. * The purpose of this program is to find the intersect
  6. * of two lines given by the user by four points
  7. *
  8. * Get the four points. x1,y1 x2,y2 x3,y3 x4,y4
  9. */
  10. Scanner input = new Scanner(System.in);
  11. System.out.print("Enter x1 y1, x2 y2, x3 y3, x4 y4: ");
  12. double x1 = input.nextDouble();
  13. double y1 = input.nextDouble();
  14. double x2 = input.nextDouble();
  15. double y2 = input.nextDouble();
  16. double x3 = input.nextDouble();
  17. double y3 = input.nextDouble();
  18. double x4 = input.nextDouble();
  19. double y4 = input.nextDouble();
  20.  
  21. }
  22. }
  23.  
  24. y = m*x + b
  25.  
  26. -m1*x + y = b1
  27. -m2*x + y = b2
  28.  
  29. [ -m1 1 ]{x} = {b1}
  30. [ -m2 1 ]{y} {b2}
Add Comment
Please, Sign In to add comment