1 条题解
-
0
C :
#include <stdio.h> int main(void) { double a, b, h; scanf("%lf%lf%lf", &a, &b, &h); printf("%.2f\n", (a+b)*h/2); return 0; }
C++ :
#include<cstdio> using namespace std; int main() { double a,b,c,s; scanf("%lf%lf%lf",&a,&b,&c); s=(a+b)*c/2; printf("%.2lf\n",s); return 0; }
Pascal :
program ygj288; var a,b,h,d:real; begin read(a,b,h); d:=(a+b)*h/2; write(d:0:2); end.
- 1
信息
- ID
- 2913
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者