C++ 代码
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int t,s;
double h;
scanf("%d%d",&t,&s);
h=static_cast<double>(s)*static_cast<double>(t)/12;
printf("%.3lf",h);
return 0;
}
C++ 代码 直接设置double类型
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
double t,s,h;
scanf("%lf%lf",&t,&s);
h=s*t/12;
printf("%.3lf",h);
return 0;
}