Created
March 25, 2019 10:11
-
-
Save vibinnair/50d410d2a04a7cb5f187e9753cad1529 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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