+ 1
How to take a user input valve in swift programming
Getting confused to do the above process
1 Odpowiedź
+ 1
You can use the readLine function:
inputString = readLine()!
inputNumber = Int(readLine()!)!
Initialize your variables first. You can change the type for your number inputs, and you can have multiple inputs on multiple lines. Each readLine will read a different input line. Also, in SoloLearn, this input is all done right at the beginning of the program.