बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

C program to calculate slope of line

C program to calculate slope of line
C program to calculate slope of line accept (x,y) from user,


#include
#include
void main()
{
float x1,x2,y1,y2,slope;
clrscr();
printf("\nEnter the x1 point of line 1=");
scanf("%f",&x1);
printf("\nEnter the y1 point of line 1=");
scanf("%f",&y1);
printf("\nEnter the x2 point of line 2=");
scanf("%f",&x2);
printf("\nEnter the y2 point of line 2=");
scanf("%f",&y2);
slope=(y2-y1)/(x2-x1);
printf("\n\n\nThe slope of line is=%.2f",slope);
getch();
}

C program to calculate slope of line
C program to calculate slope of line accept (x,y) from user,

C Program example List