#include<bits/stdc++.h>
int main(){
double a,b,h;
scanf("%lf %lf %lf,",&a,&b,&h);
double res = (a+b)*h/2;
printf("%.2lf",res);
return 0;
}
计算梯形,保留两位小数
最新推荐文章于 2025-04-26 23:01:23 发布
#include<bits/stdc++.h>
int main(){
double a,b,h;
scanf("%lf %lf %lf,",&a,&b,&h);
double res = (a+b)*h/2;
printf("%.2lf",res);
return 0;
}