func returnMultipleValues() -> (String, Int, Double) {
return ("Swift Tuple", 12, 3.14)
}
//Calling Function
let result = returnMultipleValues()
let nameString = result.0
let intValue = result.1
let doubleValue = result.2
func checkMarks() -> (String, Int) {
...
return (message, marks)
}
func compute(number: Int) -> (Int, Int, Int) {
var square = number * number
var cube = square * number
return (number, square, cube)
}
var result = compute(number: 5)
print("Number:", result.0)
print("Square:", result.1)
print("Cube:", result.2)