3 like 0 dislike
寫一個程式讀入四個整數a,b,c,d. 計算以(a,b)及(c,d)為兩對角頂點的長方形面積. 若(a,b)及(c,d)是水平或是垂直物共線則面積為0.

Sample Input:

-1 5 6 -3

Sample Output:

56

 

參考書籍:由片語學習C程式設計
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 4 views

1 Answer

0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main()
{
****** *** * * * * * a1,b1,a2,b2,s;
* * ** ** ****** ** ** **** **** ** *** * *** ** **** **
********* * ** * *** * * *** * * * ** * * *** *
* * ***** ** *** ** *** *
*** * * * * ** ***** * * * *
* * * ** ****** ** ** ** ** ** * * *****
** ** * *** * ***
* ** ** **** * * * ****** *** * ** **** ** * ** *
* * *** * * ***** *** ** 0;
}
answered by (466 points)
0 0
Case 0: Correct output
Case 1: Correct output
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.69.118
©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
| 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
| 3 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
| 3 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
| 6 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
| 3 views
8,045 questions
60,931 answers
33,050 comments
1,122 users