3 like 0 dislike
165 views
寫一個程式讀入三個正整數a,b,c並判定由a,b,c為邊長的三角形為銳角, 鈍角, 或是直角三角形. 如為銳角三角形則輸出0, 鈍角三角形則輸出1, 直角三角形則輸出2. 題目保證a,b,c可形成一個三角形.

Sample Input 1:

5 4 3

Sample Output 1:

2

Sample Input 2:

3 3 3

Sample Output 2:

0

 

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

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
| 156 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: 21833 - Available when: Unlimited - Due to: Unlimited
| 141 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
| 144 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
| 148 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
| 206 views
14,435 questions
231,452 answers
206,247 comments
5,487 users