1 solutions
-
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
Information
- ID
- 18517
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By