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 |
Tell me what are bitwise shift operators?
#include <stdio.h> void main() { int i=-1,j=1,k,l; k=!i&&j; l=!i||j; printf ("%d%d",k,l) ; }
WAP – represent a char in binary format
What are the advantages of union?
Why is struct padding needed?
Is c is a low level language?
What is ponter?
What is linear search?
write a program that will read the temperature in Celsius and convert that into Fahrenheit.
The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................
14 Answers HOV Services, IBM, Potty,
what is the function of void main()?
Why c++ is called c++ and not c+?