a 'c' program to tell that the set of three coordinates lie
on a same line
Answers were Sorted based on User's Feedback
Answer / vamshi krishna
write a code that checks area of triangle formula i.e
x1(y3-y2)+x2(y1-y3)+x3(y2-y1)=0.
if zero points lie on same line
| Is This Answer Correct ? | 27 Yes | 2 No |
Answer / 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 |
Answer / 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 |
There are 8 billiard balls, and one of them is slightly heavier, but the only way to tell was by putting it on a weighing scale against another. What's the fewest number of times you'd have to use the scale to find the heavier ball?
Difference between Class and Struct.
13 Answers Ericsson, Motorola, Wipro,
what is difference between array of characters and string
How to write a C program to determine the smallest among three nos using conditional operator?
Is c an object oriented programming language?
union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }
What are the languages are portable and platform independent?Why they are like that?
How do you view the path?
Explain what is meant by 'bit masking'?
what defference between c and c++ ?
If null and 0 are equivalent as null pointer constants, which should I use?
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..