3 like 0 dislike
91 views
寫一個程序決定三個線段是否能形成一個三角形. 注意:我們可以平移線段, 但不能旋轉或是翻轉線段, 題目假設所有線段有不同的斜率, 所以不必擔心有面積為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)
ID: 21833 - Available when: Unlimited - Due to: Unlimited
| 91 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.175.118
©2016-2024

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)
ID: 21842 - Available when: Unlimited - Due to: Unlimited
| 85 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)
ID: 21832 - Available when: Unlimited - Due to: Unlimited
| 83 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)
ID: 21831 - Available when: Unlimited - Due to: Unlimited
| 98 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)
ID: 21830 - Available when: Unlimited - Due to: Unlimited
| 95 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)
ID: 21829 - Available when: Unlimited - Due to: Unlimited
| 160 views
12,783 questions
183,443 answers
172,219 comments
4,824 users