+ 6
How to get the user input in swift programming?
6 ответов
+ 4
let a = readLine()
+ 4
Ok 😄 Thank you buddy.
+ 3
ShortCode, it is displaying me error.
+ 1
hi Ayush Sinha,
i made an example:
https://code.sololearn.com/cr0BRcV2MEE1/?ref=app
if you have any questions just ask.😄
0
Sorry Ayush Sinha, i meant readLine()
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()