Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. //To calculate the Area of the Pool
  2. func Area(PoolLength:Double,PoolWidth:Double)-> Double
  3. {
  4. let area = PoolLength * PoolWidth
  5. return area
  6. }
  7.  
  8. //To calculate the Volume of the Pool
  9. func poolVolume(PoolLength:Double, PoolWidth:Double, ShallowDepth:Double,DeepDepth:Double)->Double{
  10.  
  11. let area = PoolLength * PoolWidth
  12. let avgDepth = ((ShallowDepth + DeepDepth) / 2)
  13. let volume = area * avgDepth
  14.  
  15.  
  16. return volume
  17. }
  18.  
  19. return (Area(),poolVolume())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement