#include<stdio.h>
int main()
{
float t,d,h;
float area;
printf("输入梯形的上底t,下底d,高h:\n");
scanf("%f %f %f",&t,&d,&h);
area=((t+d)*h)/2;
printf("梯形的面积为:%f\n",area);
return 0;
}
#include<stdio.h>
int main()
{
float t,d,h;
float area;
printf("输入梯形的上底t,下底d,高h:\n");
scanf("%f %f %f",&t,&d,&h);
area=((t+d)*h)/2;
printf("梯形的面积为:%f\n",area);
return 0;
}