+ 1

How to take a user input valve in swift programming

Getting confused to do the above process

8th Sep 2019, 6:55 AM
Yash chitroda
Yash chitroda - avatar
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.
8th Sep 2019, 10:32 PM
Benjamin