Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialnguoisechia .com
Courses Plus Student 6,025 PointsFinally, read the user’s response from the console and store it back into the bookTitle variable
Finally, read the user’s response from the console and store it back into the bookTitle variable
string s = "bookTitle";
System.Console.Write("Enter a book title: ");
2 Answers
Steven Parker
231,210 PointsWithout giving a complete spoiler, here's a couple of hints:
- The challenge asked you to create a variable named bookTitle (not s, did that pass the previous tasks?)
- The initial contents of the variable are a book title (but that can be anything)
- To get the user's input, you may want to use System.Console.ReadLine()
Hope that'll get you going.
robbiebaker
1,431 PointsYou can also do both in one line of code at a later point.
string x = system.console.readline();