Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Basics (Retired) Console I/O Console I/O

Daniel Hunter
Daniel Hunter
4,622 Points

I can't understand why this code won't pass the task.

I have copied and pasted "Enter a book title: " as it says to do but it is still saying make sure it is written exactly like the question, I can't understand why it won't pass the task

CodeChallenge.cs
System.Console.Write()"Enter a book title: "

2 Answers

andren
andren
28,526 Points

You have to place the string within the parenthesis that follow the Write method in order to pass the string to the method. Also you have forgotten to place a semicolon after the method call, which is mandatory.

If you fix those two issues like this:

System.Console.Write("Enter a book title: ");

Then your code will work.

Daniel Hunter
Daniel Hunter
4,622 Points

hi Andren,

oh yeah, sorry I feel really stupid now! I tried this task yesterday and did have the semicolon but didn't put the string in the parenthesis. thank you.

Dan