+ 6

How to get the user input in swift programming?

3rd Jan 2019, 12:14 AM
Ayush Sinha
Ayush Sinha - avatar
6 Answers
+ 4
let a = readLine()
3rd Jan 2019, 12:17 AM
ShortCode
+ 4
Ok 😄 Thank you buddy.
3rd Jan 2019, 12:31 AM
Ayush Sinha
Ayush Sinha - avatar
+ 3
ShortCode, it is displaying me error.
3rd Jan 2019, 12:27 AM
Ayush Sinha
Ayush Sinha - avatar
+ 1
hi Ayush Sinha, i made an example: https://code.sololearn.com/cr0BRcV2MEE1/?ref=app if you have any questions just ask.😄
3rd Jan 2019, 12:50 PM
Tygo
Tygo  - avatar
0
Sorry Ayush Sinha, i meant readLine()
3rd Jan 2019, 12:29 AM
ShortCode
0
Error can be displayed if your playground doesn't have a UIkit framework where you are supposed to enter the command code. If you have it, try this code: print("Please Enter your name") let name=readline()
3rd Jan 2019, 1:05 AM
Adediji David
Adediji David - avatar