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

What will the preprocessor do for a program?

593


code for replace tabs with equivalent number of blanks

1642


How can I find out how much free space is available on disk?

631


Explain what is the benefit of using enum to declare a constant?

589


Why functions are used in c?

587






How can I read data from data files with particular formats?

606


What is enumerated data type in c?

629


What is the -> in c?

586


Differentiate between declaring a variable and defining a variable?

610


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

725


what are # pragma staments?

1631


What is anagram in c?

521


What is a global variable in c?

591


What is the difference between void main and main in c?

626


How do I create a directory? How do I remove a directory (and its contents)?

608