a 'c' program to tell that the set of three coordinates lie
on a same line

Answer Posted / chetan kole

m1=(y2-y1)/(x2-x1);
m2=(y3-y2)/(x3-x2);
if(m1==m2)
{
printf("3 points are on same line")
}
else
{
printf("not on same line");
}

Is This Answer Correct ?    19 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you sort filenames in a directory?

600


What is the difference between the expression “++a” and “a++”?

646


What is #define?

569


What is the equivalent code of the following statement in WHILE LOOP format?

761


What is the use of a conditional inclusion statement in C?

594






What is the difference between declaring a variable by constant keyword and #define ing that variable?

2690


Explain a pre-processor and its advantages.

618


Which is the memory area not included in C program? give the reason

1499


Explain the properties of union.

607


simple program of graphics and their output display

1464


What are the features of c languages?

624


What is bubble sort in c?

629


What is c system32 taskhostw exe?

582


What is static identifier?

699


What are the advantages of using Unions?

642