port java.util.Scanner; public class slope public static void main(String[] args) double yi,y2,x2,1; float Slope=; // Create a
Fantastic news! We've Found the answer you've been seeking!
Question:
port java.util.Scanner; public class slope public static void main(String[] args) double yi,y2,x2,1; float Slope=; // Create a Scanner object to read input. Scanner SC Scanner(System.in); 1/ Get the slope Y and x coordinates. System.out.println("enter coordinates for point X1"); x1 = SC.nextDouble(); System.out.println("enter coordinates for point 41" yi = Sc.nextDouble(); System.out.println("enter coordinates for point x2 | x2 = SC.nextDouble(); System.out.println("enter coordinates for point 42" y2 = SC.nextDouble(); ") and (x2 y2 )) System.out.print("The points are: ("X1",7 //calculate slope formula double slope = (y2-y1)/(x2-x1); System.out.println("the slope is:" slope); Lire 9. Column 1 MacBook
Posted Date: