Dodecahedron คืออะไร
คำว่า 'สิบสองหน้า' มาจากคำภาษากรีกที่ dodeca หมายถึง 'สิบสอง' และ hedron ระบุ 'ใบหน้า' Dodecahedron ในเรขาคณิตเป็นแบบสามมิติหรือของแข็งปกติที่มีใบหน้าแบนสิบสองหน้า เช่นเดียวกับ ตัวเลขอื่นๆ สิบสองหน้าก็มีคุณสมบัติเช่นกัน −
- จุดยอดรูปทรงหลายเหลี่ยม 20 จุด
- ขอบหลายเหลี่ยม 30 ด้าน
- รูปห้าเหลี่ยม 12 รูป รูปห้าเหลี่ยมเป็นรูปหลายเหลี่ยมห้าเหลี่ยม
ด้านล่างเป็นรูปของสิบสองหน้า

ปัญหา
ด้วยขอบ โปรแกรมจะต้องหาพื้นที่ผิวของสิบสองหน้า โดยที่ พื้นที่ผิว คือ พื้นที่ทั้งหมดที่ใช้โดยใบหน้าของรูปนั้น
ในการคำนวณพื้นที่ผิวของสิบสองหน้ามีสูตร -

ตัวอย่าง
Input-: side=5 Output-: 516.143
อัลกอริทึม
Start Step 1 -> declare function to find area of dodecahedron double area(int side) return ((3 * sqrt(25 + 10 * (sqrt(5)))) * (pow(side, 2))) Step 2 -> In main() Declare variable int side=5 Print area(side) Stop
รหัส
#include <bits/stdc++.h>
using namespace std;
//function to find area of dodecahedron
double area(int side){
return ((3 * sqrt(25 + 10 * (sqrt(5)))) * (pow(side, 2))) ;
}
int main(){
int side = 5;
cout<< "Surface area of dodecahedron is : " << area(side);
return 0;
} ผลลัพธ์
Surface area of dodecahedron is : 516.143