Advertisement
DanikYakush

Task9

Jul 2nd, 2022
638
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Task9 {
  4.     public static void main(String[] args){
  5.         int x1, x2, x3, y1, y2, y3;
  6.         Scanner in = new Scanner(System.in);
  7.         x1 = in.nextInt();
  8.         y1 = in.nextInt();
  9.         x2 = in.nextInt();
  10.         y2 = in.nextInt();
  11.         x3 = in.nextInt();
  12.         y3 = in.nextInt();
  13.         if ((x3 - x1) / (x2 - x1) == (y3 - y1) / (y2 - y1)) System.out.println("Лежат");
  14.         else System.out.println("Не лежат");
  15.     }
  16. }
  17.  
Advertisement
RAW Paste Data Copied
Advertisement