/***************************************************
Computing Slopes

Write a program that reads values x1,y1,x2,y2 and 
prints out the slope of the line passing through 
(x1,y1) and (x2,y2).  The slope is given by:

    slope = (y1 - y2) / (x1 - x2)

For the purists among you, you may assume that the
line is not vertical.
***************************************************/
#include <iostream>
using namespace std;

int main()
{
  // Read first point
  double x1;  
  cout << "Enter x1: ";
  cin >> x1;
  double y1;  
  cout << "Enter y1: ";
  cin >> y1;

  // Read second point
  double x2;
  cout << "Enter x2: ";
  cin >> x2;
  double y2;
  cout << "Enter y2: ";
  cin >> y2;

  // Compute the slope
  double slope;
  slope = (y1 - y2) / (x1 - x2);
  
  // Print out slope
  cout << "The slope is: ";
  cout << slope << endl;

  return 0;
}