Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //To calculate the Area of the Pool
- func Area(PoolLength:Double,PoolWidth:Double)-> Double
- {
- let area = PoolLength * PoolWidth
- return area
- }
- //To calculate the Volume of the Pool
- func poolVolume(PoolLength:Double, PoolWidth:Double, ShallowDepth:Double,DeepDepth:Double)->Double{
- let area = PoolLength * PoolWidth
- let avgDepth = ((ShallowDepth + DeepDepth) / 2)
- let volume = area * avgDepth
- return volume
- }
- return (Area(),poolVolume())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement