1 solutions
-
0
C :
#include <stdio.h> void main() { int a,b,h; double s; scanf("%d %d %d",&a,&b,&h); s=(a+b)*h/2.0; printf("%.1f\n",s); }
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ float a,b,h; cin>>a>>b>>h; cout<<fixed<<setprecision(1)<<(a+b)*h/2<<endl; return 0; }
Python :
a,b,h=map(int,input().split()) s=(a+b)*h/2 print('%.1f'% s)
- 1
Information
- ID
- 10638
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By