#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;
}
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