program to find equation of straight line passing through two points(x1,y1) and (x2,y2)-by enggfact - Enggfact

Latest

Convert your Passion into your Profession

Sunday, September 1, 2019

program to find equation of straight line passing through two points(x1,y1) and (x2,y2)-by enggfact

#include<stdio.h>
int main()
{
float x1,x2,y1,y2,m,c;
printf("enter the first coordinates:");
scanf("%f %f',&x1,&y1);
printf("enter the second coordinates:");
scanf("%f %f",&x2,y2);
m=(y2-y1)/(x2-x1);
c=y1-m*x1;
printf("equation of straight line \n Y=%fX+5f',m.c);
return 0;
}

No comments:

Post a Comment