I am trying to write a function that takes the sum of 2 variables but I want to be able to make it so I asks the value of the 2 variables instead of manually writing them.
Here is the function I originally wrote:
func sumOfNumbers() {
var x = 2
var y = 13
let sumNumbers = x + y
print(sumNumbers)
}
sumOfNumbers()
I want it to prompt me in the console for a value of "x" and "y". Thank you.