Thank u everyone that helped me. Here is the finished source code.
----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
main()
{
float x1, y1, x2, y2, m ;
float X , Y ;
printf ( "To find the slope of your line enter the following: \n\n" ) ;
printf ( "The First set of points. eg. (x,y) \n" ) ;
printf ( "x: \n" ) ;
scanf ( "%f" , &x1 ) ;
printf ( "y: \n" ) ;
scanf ( "%f" , &y1 ) ;
printf ( "The Second set of points. eg. (x,y) \n" ) ;
printf ( "x: \n" ) ;
scanf ( "%f" , &x2 ) ;
printf ( "y: \n" ) ;
scanf ( "%f" , &y2 ) ;
Y = y2 - y1 ;
X = x2 - x1 ;
m = Y / X ;
printf ( "\nThe slope of the line is: %f " , m) ;
printf ( "\n\n" ) ;
system("PAUSE");
}
---------------------------------------------------------------------------
I have a few more questions, try the program and when u get your answey it will be form (eg.) 2.000000. How would i go about shortening this to 2.0?
And if 4 numbers are entered which are equal how would i desplay an error message telling the user to start again?