+ 2
How to get a user input in swift?
Accepting numbers by user
4 ответов
+ 1
let s = readLine()
var n = Int(s!)
+ 1
Can u give me an example of adding 2 number with accepting user input
0
let s = readLine()
var n = Int(s!)
print(n! + 5)
This adds 5 to a number... Your turn :)
0
Var a = 10
Var b = 20
Let c = a+b
Print(c)
Sameee program but i wanna 2 input from user!? How can we do that