Take four doubles from the command line, x1,y1 and x2,y2 (representing 2D * coor
ID: 3749759 • Letter: T
Question
Take four doubles from the command line, x1,y1 and x2,y2 (representing 2D
* coordinates) and compute the slope described by the line. The slope formula
* is:
* (y2 - y1)
* slope = ---------
* (x2 - x1)
*
* Print the usage message: "Usage: h4 x1 y1 x2 y2" if not enough parameters
* are provided. The output should be:
* slope of (x1,y1) to (x2,y2) is slope
* Print the input coordinates to 2 decimal places and the slope
* itself to 4 decimal places.
*
* Example input/output:
* ./h4 1 2.5 -11.5 6
* slope of (1.00,2.50) to (-11.50,6.00) is -0.2800
int main(int argc, char *argv[])
{
return 0;
}