6 like 0 dislike
1.5k views
直線方程式的通式為 ax+by+c=0 ,請設計一程式,由使用者輸入平面上兩個點的座標,程式會找到直線方程式。

 

輸入說明:

會連續輸入四個浮點數,兩兩間以空白隔開,分別代表第一個點的x座標,第一個點的y座標,第二個點的x座標以及第二個點的y座標。

 

輸出說明:

請在一行輸出a,b,c三個數,用空白隔開他們。請將a約分到1,如果a是0,請將b約分到1。

 

輸入範例:

0.0 0.0 5.78 5.78

 

輸出範例:

1 -1 0
[Exam] asked in 2017-1 程式設計(一)AD by (30k points)
ID: 29384 - Available when: Unlimited - Due to: 2017-10-27 21:30
| 1.5k views

14 Answers

0 like 0 dislike
Hidden content!
** * ** * *** * * * ** * * * * ***
80/100 answered by (160 points)
0 like 0 dislike
Hidden content!
** ** *** ****** *** ******** * *** ** *** ** **
20/100 answered by (190 points)
0 like 0 dislike
Hidden content!
****** **** **** ** * * **** * ** ** ****
80/100 answered by (215 points)
0 like 0 dislike
Hidden content!
* * ** * *** * *** * * * * ** **** **
50/100 answered by (196 points)
0 like 0 dislike
Hidden content!
*** ** * * ** * ** * ***** * *** *** * * ****
100/100 answered by (114 points)
0 like 0 dislike
Hidden content!
** * * * * * ** * ** ** **** **
100/100 answered by (224 points)
0 like 0 dislike
Hidden content!
*** * *** * * * ** **** * ****** * * * * *** ** *
100/100 answered by (209 points)
0 like 0 dislike
Hidden content!
* * * **** **** ** * * *** ** ***
20/100 answered by (194 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

int main ()

{
* * * * * * * *** **** * a,b,c,d,r,s,t;
*** * *** ** * *** ** * * * * ** ** * ** ***** * * * *****
* ** * * ** **** * * %f",&a,&b );
** * *** ******* ** * * ** ** **** *** * * **
* ** * * **** * * %f",&c,&d );

    
** * *** ** ** * * * *** ** ** * ** ***
** * ****** ** ** *** *** * ** * * *
* * * * *** * * *** ** ** * ***** * ***
** * * *** * ** * ** ** **** ** ** **
* ** * ***** * ** ** * * ****** ** * * *** * **** * ** **** * ** ******* ***
*** *** *** ** *** ** ** * * ** * ****** ** ***** * * *
** ** * **** ** * *
* * * * * * ** ** * ** ** **** ***** ** ** * * * ** * * *** * *
* ** * ** * * ** * * ** ****** * * * **** * **
* ******* *** * * * ** * *** ** * * * *** * ** **** * *** * * ** *** * * ****
* *** * * * * * * * *** * * ** **** *** *** * * *** * * ** ****** %f %f ",s,t);

    

    

system("pause");

return 0;    

}
100/100 answered by (172 points)
edited by
0 like 0 dislike
Hidden content!
* ** * * ** * *** ***** * *** * ***** **
100/100 answered by (228 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.130.145
©2016-2025

Related questions

3 like 0 dislike
12 answers
[Exam] asked Dec 23, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 38938 - Available when: 2017-12-23 09:00 - Due to: 2017-12-23 12:10
| 4k views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31098 - Available when: Unlimited - Due to: Unlimited
| 17 views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31097 - Available when: Unlimited - Due to: Unlimited
| 14 views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31096 - Available when: Unlimited - Due to: Unlimited
| 17 views
12,783 questions
183,442 answers
172,219 comments
4,824 users