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);
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started