#include<stdio.h> int main () { float a,b,h,s; while(scanf("%f,%f,%f",&a,&b,&h)!=EOF) { s=(a+b)*h/2; printf("%.2f",s); } return 0; }
原文地址:https://www.cnblogs.com/Estwind/p/9710471.html
时间: 2024-11-08 20:27:03
#include<stdio.h> int main () { float a,b,h,s; while(scanf("%f,%f,%f",&a,&b,&h)!=EOF) { s=(a+b)*h/2; printf("%.2f",s); } return 0; }
原文地址:https://www.cnblogs.com/Estwind/p/9710471.html