• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

How can I read input from keyboard with Swift 4?

It's not in the Swift course. I tried this way, but... Gives this error. I don't know if it's only for Mac and IOS development. https://code.sololearn.com/cdJ4o028L89e/?ref=app

swiftinput
11th Feb 2021, 9:23 PM
ChronoRevers
ChronoRevers - avatar
1 Answer
+ 6
var message = readLine()! print(message) https://www.sololearn.com/Discuss/1457999/?ref=app https://www.sololearn.com/Discuss/2493372/?ref=app
12th Feb 2021, 1:00 AM
Simba
Simba - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
How do I bridge the gap between learning and doing.
1 Votes
Please help me
2 Votes
How i learn it I feel bhai it's tough some one help me 😐
0 Votes
Game
0 Votes
WHY THEY CHANGED IN LESSONS PRACTICE JUST FOR PRO USERS?
1 Votes
Please recommend me
0 Votes
How can I make a note-taking app in Python (NoteNinja Project)?
0 Votes
how to make sans fight on web language
1 Votes
chat I wanna make a bullet hell game what language(s) do I need to know?
0 Votes
Dc
0 Votes