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 ? | 10 Yes | 5 No |
Post New Answer View All Answers
What is the explanation for cyclic nature of data types in c?
What is the use of pragma in embedded c?
What does return 1 means in c?
What is graph in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What are the advantages of the functions?
Describe the modifier in c?
How can I prevent another program from modifying part of a file that I am modifying?
Is it possible to initialize a variable at the time it was declared?
Write a Program to find whether the given number or string is palindrome.
Why is c so popular?
How do shell structures work?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is 1f in c?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.