#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;
zeroground 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
zeroground 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Salem commented: Yeah, you tell 'em! +12
zhelih -1 Junior Poster
Narue 5,707 Bad Cop Team Colleague
zhelih -1 Junior Poster
zhelih -1 Junior Poster
invisal 381 Search and Destroy
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
ShawnCplus 456 Code Monkey Team Colleague
zhelih -1 Junior Poster
invisal 381 Search and Destroy
ShawnCplus 456 Code Monkey Team Colleague
invisal 381 Search and Destroy
zhelih -1 Junior Poster
zandiago 115 Nearly a Posting Maven Featured Poster
ShawnCplus 456 Code Monkey Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
invisal 381 Search and Destroy
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.