Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions