Skip to content

Dwashi2/swift-TotalVolumeofAllBoxes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

swift-TotalVolumeofAllBoxes


Swift Study

Project to study Swift 5.4

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contact

About The Project

 Given an array of boxes, create a function that returns the total volume of all those boxes combined together. A box is represented by an array with three elements: length, width and height.
 For instance, totalVolume([2, 3, 2], [6, 6, 7], [1, 2, 1]) should return 266 since (2 x 3 x 2) + (6 x 6 x 7) + (1 x 2 x 1) = 12 + 252 + 2 = 266.
 
 Examples:
 totalVolume([4, 2, 4], [3, 3, 3], [1, 1, 2], [2, 1, 1]) ➞ 63
 totalVolume([2, 2, 2], [2, 1, 1]) ➞ 10
 totalVolume([1, 1, 1]) ➞ 1
 
 Notes:
 You will be given at least one box.
 Each box will always have three dimensions included.

 Excercise from: https://edabit.com/challenges/swift

Getting Started

Open the file TotalVolumeofAllBoxes.xcodeproj

Prerequisites

  • Xcode 12.4
  • Use iPhone 12 mini as simulator

Contact

Daniel Washington Ignacio - danielvertigo@hotmail.com

Click to access my LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages