计算等边三角形外接圆面积的程序
外接圆是在其内刻有规则多边形的圆。内切圆的三角形是等边三角形。外接圆的面积可以使用以下公式找到,
外接圆的面积=“(a*a*(丌/3))”
代码逻辑,使用数学公式(a*a*(丌/3))找到等边三角形的外接圆面积。此代码中丌的值编码为3.14。该表达式被评估为浮点值。
示例
#include <stdio.h>
#include <math.h>
int main(){
int a = 5;
float area;
float pie = 3.14;
printf("Program to calculate area of Circumcircle of an Equilateral Triangle\n");
printf("The side of the triangle is %d \n", a);
area = ((pie/3)*a*a);
printf("The area of of Circumcircle of an Equilateral Triangle is %f \n", area);
return 0;
}输出结果
Program to calculate area of Circumcircle of an Equilateral Triangle The side of the triangle is 5 The area of circle inscribed inside a square is 19.625000
热门推荐
10 新人红包祝福语简短精辟
11 幼师给毕业祝福语简短
12 生日高考祝福语妹妹简短
13 下飞机祝福语简短英文
14 元宵发客户祝福语简短
15 爸妈金婚文案祝福语简短
16 新郎朋友红包祝福语简短
17 虎年五一祝福语大全简短
18 出阁宴祝福语姐姐简短