0 like 0 dislike
正三角形的面積公式是[4分之根號3乘a平方],請設計一個程式,讓使用者輸入正三角形的邊長,然後輸出正三角形的面積,輸出時請輸出並四捨五入到小數點後兩位。

範例輸入:

8

範例輸出:

21.71
[Normal] Coding (C) - asked in 2016-1 程式設計(一)AC by (18k points)
Available when: Unlimited - Due to: Unlimited
3 flags | 262 views
0 0
Called for Help

35 Answers

0 like 0 dislike
Hidden content!
#include ** ** ***
* ** ** ***
* * ** *** ** * ***



int main()

{
*** * ** * * ** * * * a,A;
*** * * * * ** * * ** ****** * * *


** ***** ** * = sqrt(3) / 4 *a*a ;
** ** * ** * ** * ** ***** * * * **



}
answered by (-162 points)
0 like 0 dislike
Hidden content!
#include * * * ****
*** * ** ** * *
** * * * ** * **



int main()





{
* * ** * * **** ***  a;


* ***** * * *** * * *** ** * * * *


* ****** * ****** * * * * * * *** * *** *** ***


* * ** * ** *** * * 0;



}
answered by (-85 points)
0 like 0 dislike
Hidden content!
****** ** *** ** **



int *

{
** * * ** * * ** * n, A;


** ** * **** * * ***** *** , **
* * * * * ** * * *** = 1.732 * n * n / 4;
****** ****** ******* * * * ** , A);



}
answered by (-90 points)
0 like 0 dislike
Hidden content!
* ** ** * * *



int *

{
* ** * * *** *** n, A;


******** ** * ** ** * ** , **** *
* ** *** ** * *** = 1.73 * n * n / 4;
*** * * ** ***** * ** ** * * * , A);



}
answered by (-90 points)
0 like 0 dislike
Hidden content!
* * * * ** *



int main()

{
**** * * ** * * n, A;


* * *** **** ***** ** ******* ** ** , * *** *
** * * * **** = 1.73 * n / 4;
**** ** * * ** ******** * **** , ** **



}
answered by (-90 points)
0 like 0 dislike
Hidden content!
** ** * ********* * *



int main()

{
* ** ** ***** n, A;


* * ** * * ** ** ***** ** * ** , ****** *
**** *** * * * ** = 1.732 * n / 4;
** * * * ** * ** * *** * * * ** , *** *



}
answered by (-90 points)
0 like 0 dislike
Hidden content!
** * **** * **



int main()

{
** * * ** * * ** n, A, k;


** ** ** * * **** ** ** **** *** * , *
*** * * * **** ** = k * k;
* * * * * * = k * n / 4;
* **** * * * * * * * * * * , * * *



}
answered by (-90 points)
0 like 0 dislike
Hidden content!
#include ******* ***

#include ** **** ** **



int main()

{
* ***** * ** **** * ** i;
* * ******* **** *** * area;
* ** ** * ***** * * * * * * * * * ***


* ** ** ****** * * * = (1.732/4) * i * i;




* * ** *** * * * ** *** ******* * ** *
***** ** *** *** * *** ** * 0;

}
answered by (-114 points)
0 like 0 dislike
Hidden content!
#include * * *** *

#include *** * * *



int main()

{
** *** * * ******** * i;
** ** * ******** * * ** * * area;
** * * **** **** * * ** *** * * ***


* ** ***** *** * * * * = (1.73/4) * i * i;




* * * **** *** ** ***** * ** *** *** ***
* ** *** ****** *** ** * * 0;

}
answered by (-114 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include ** * * *

#include <math.h>

int main()

{
* **** **** * ** ****** a,b;
* * * * ** * * * **
* * ** ***** ** ** ** * *** * * ** ** ***
* ** * ** * * * *** * *** **
*** ** * *** ** * ** * *** ** ** * **
* ** ** ** ** * ** * **
* ** ***** * * * *** * **** * ** *
*** * * ** * ** * **** * 0;

}
answered by (-124 points)
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.79.41
©2016-2020

Related questions

0 like 0 dislike
43 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 267 views
0 like 0 dislike
49 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 228 views
0 like 0 dislike
39 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 221 views
0 like 0 dislike
7 answers
[Exercise] Coding (C) - asked Oct 27, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: 2016-10-27 18:30:00 - Due to: 2016-10-27 21:00:00
| 79 views
9,614 questions
94,666 answers
76,330 comments
2,930 users