Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. int x1,y1,x2,y2,x3,y3;
  6. int s1,s2,s3;
  7. scanf("%d%d",&x1,&y1);
  8. scanf("%d %d",&x2,&y2);
  9. scanf("%d%d",&x3,&y3);
  10. if(y1==0&&y2==0&&y3==0)
  11. {
  12. printf("No");
  13. }
  14. else
  15. {
  16. s1 = (int)((x2-x1)/(y2-y1));
  17. s2 = (int)((x3-x1)/(y3-y1));
  18. s3=(x3-x1)/(y3-y1);
  19. if((s1 == s2) && (s2 == s3)&&(s3==s1))
  20. printf("Yes");
  21. else
  22. printf("No");
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement