// function definition
func getSquare(num: Int) -> Int{
return num * num
}
for i in 1...3{
// function call
var result = getSquare(num: i)
print("Square of (i) =",result)
}
// function definition
func getSquare(num: Int) -> Int{
return num * num
}
for i in 1...3{
// function call
var result = getSquare(num: i)
print("Square of (i) =",result)
}