3 like 0 dislike
寫一個程序決定三個線段是否能形成一個三角形. 注意:我們可以平移線段, 但不能旋轉或是翻轉線段, 題目假設所有線段有不同的斜率, 所以不必擔心有面積為0的三角形.

輸入有12行, 每4行代表一線段的起點與終點的x及y座標. 如果三個平面線段可以形成一個三角形則輸出1, 否則輸出為0.

Sample Input:

20

20

23

23

100

100

102

98

50

50

55

51

Sample Output:

1

 

參考書籍:由片語學習C程式設計
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.63.43
©2016-2019

Related questions

3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 5, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 5 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 5, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 5, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 7 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 5, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views
3 like 0 dislike
1 answer
[Normal] Coding (C) - asked Feb 5, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 5 views
8,792 questions
72,364 answers
47,172 comments
2,043 users