C++ 代码
#include <iostream>
using namespace std;
const double P = 3.14159;
int main()
{
double a,b,c;
double s[4];
cin >> a >> b >> c;
s[0] = a*c / 2;
s[1] = P * c*c;
s[2] = (a + b)*c /2;
s[3] = b*b;
s[4] = a*b;
printf("TRIANGULO: %.3lf\n",s[0]);
printf("CIRCULO: %.3lf\n",s[1]);
printf("TRAPEZIO: %.3lf\n",s[2]);
printf("QUADRADO: %.3lf\n",s[3]);
printf("RETANGULO: %.3lf\n",s[4]);
return 0;
}