```
#include<stdio>
#include<iostream>
#include<conio>
/* 2 point form*/
float x1,x2,y1,y2;
cout << "\n Enter values in order x1,x2,y1,y2: ";
cin>>x1>>x2>>y1>>y2;
float slope;
slope=(y2-y1)/(x2-x1);
float c=y1-slope*x1;
cout<<"\nThe equation of the line is : y="<<slope<<" x + "<<c<<endl;
```