Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vibinnair/50d410d2a04a7cb5f187e9753cad1529 to your computer and use it in GitHub Desktop.
Save vibinnair/50d410d2a04a7cb5f187e9753cad1529 to your computer and use it in GitHub Desktop.
import Foundation
func add(_ x: Int, _ y: Int) -> Int {
return x + y
}
func square(_ x: Int) -> Int {
return x * x
}
func raiseToPowerofThree(_ x: Int) -> Int {
return x * x * x
}
print(add(1, 2))
print(add(3, 4))
print(square(2))
print(square(6))
print(raiseToPowerofThree(2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment