이 문제에서는 정이십면체의 한 면을 나타내는 값이 주어집니다. 우리의 임무는 정이십면체 C++의 면적과 부피를 구하는 프로그램을 만드는 것입니다.
이십면체 는 정다면체 30면체입니다. 같은 변의 정삼각형이 20개 있습니다. 이 다면체의 꼭짓점은 12개뿐입니다.

파선은 보이는 표면 뒤에 있는 가장자리를 위한 것입니다.
문제를 이해하기 위해 예를 들어보겠습니다.
입력
a = 4
솔루션 접근 방식
문제를 해결하기 위해 기하학적 공식을 사용하여 20면체의 면적을 구합니다.
표면적(면적) =$5\square^2\sqrt{3}=8.660 * a^2$
볼륨 =$Volume =\frac{5\square^2}{12}(3+\sqrt{5})=2.1817 * a^3$
우리 솔루션의 작동을 설명하는 프로그램
예시
#include <iostream>
using namespace std;
float calcIcoSArea(float a) {
return (8.660 * a * a);
}
float calcIcoVolume(float a) {
return (2.1817 * a * a * a);
}
int main(){
float a = 7;
cout<<"The length of side of icosahedron is "<<a<<endl;
cout<<"The surface area of icosahedron is "<<calcIcoSArea(a)<<endl;
cout<<"The volume of icosahedron is "<<calcIcoVolume(a)<<endl;
return 0;
} 출력
The length of side of icosahedron is 7 The surface area of icosahedron is 424.34 The volume of icosahedron is 748.323