blob: d812e93921e086304c785acf0260e3d0db71e83e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//
//areas
a1=2050,a2=8400,a3=16300,a4=24600,a5=31500,
h=5
printf("\n according to trapezoidal rule')
v1=(h/2)*(a1+a5+2*(a2+a3+a4))
printf("\n volume = %0.3f meter cube",v1)
printf("\n according to prismoidal rule')
v2=(h/3)*(a1+a5+4*(a2+a4)+2*(a3))
printf("\n volume = %0.3f meter cube",v2)
|