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 trialMatt L
1,030 PointsStuck
string bookTitle = "Tom Sawyer"; System.Console.Write("Enter a book title: "); string entry = System.Console.Readline();
Stuck on the 4th step. No clue what to do.
string bookTitle = "Tom Sawyer";
System.Console.Write("Enter a book title: ");
string entry = System.Console.Readline();
5 Answers
Jake Lundberg
13,965 Pointsinstead of creating a new variable called "entry" like you just did, you need to assign the value from System.Console.Readline() to your existing variable "bookTitle".
bookTitle = System.Console.Readline();
qasimalbaqali
17,839 PointsYour code should look like this
string bookTitle = "My fav book";
System.Console.Write("Enter a book title: ");
bookTitle = System.Console.ReadLine();
The mistake that you did is using entry. They told you get whatever the user gives you and store it in the string bookTitle
Matt L
1,030 PointsYea I don't know how to do that.
Jake Lundberg
13,965 PointsbookTitle = System.Console.Readline();
Matt L
1,030 PointsOOOOOOOOOOh, ok thanks.
Jake Lundberg
13,965 Pointsoops, typo - "L" in Readline needs to be capitalized...
bookTitle = System.Console.ReadLine();
Matt L
1,030 PointsPerfect thanks.
qasimalbaqali
17,839 PointsIf my answer have answered your question and helped you solve the problem, please choose it as Best Answer. Thank you :)