How to calculate a cubic centimeter

How to calculate a cubic centimeter

If it's a cube, it's side length by side length by side length
If it's a cuboid, it's the bottom area times the height
If it's a cylinder, it's the bottom area times the height
If it's trapezoid, multiply the sum of the two bottom areas by the height and divide by 2
For example, there is a rectangular swimming pool, 2 meters deep, 20 meters long and 10 meters wide
How many cubic meters of water can be injected into the swimming pool?
2 × 20 × 10 = 400 m3
The volume of this swimming pool is 400 cubic meters