How to get input in Swift 4 ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How to get input in Swift 4 ?

Hi guys, give me my answer.

16th Aug 2018, 8:27 PM
program
program - avatar
1 Answer
+ 2
You can use readLine, from the Swift Standard Library. let response = readLine() print("Your response is \(response!).") for more information you can read this article http://keitaito.com/blog/2017/01/27/how-to-read-standard-input-in-swift.html
17th Aug 2018, 9:28 AM
Dababi Mohamed Amine
Dababi Mohamed Amine - avatar