
任何图形的表面积都是其表面覆盖的总面积。
六角棱柱是两端都有六边形的三维图形。棱柱考试看起来像 -
在数学中,六角棱柱被定义为具有 8 个面、18 个边、12 个顶点的三维图形。

Surface Area = 3ah + 3√3*(a2)
Volume = (3√3/2)a2h
示例
#include <stdio.h>
#include<math.h>
int main() {
float a = 5, h = 10;
//Logic to find the area of hexagonal prism
float Area;
Area = 6 * a * h + 3 * sqrt(3) * a * a;
printf("Surface Area: %f",Area);
//Logic to find the Volume of hexagonal prism
float Volume;
Volume = 3 * sqrt(3) * a * a * h / 2;
printf("Volume: %f
",Volume);
retu
.........................................................