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 trial

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

I don't know what I'm doing wrong. Its telling me to print using System.Console.Write() I am and its wrong

use System.Console.Write() to print method to the screen "Enter book title:"

I'm doint System.Console.Write("My book title:")..what am I doing wrong?

CodeChallenge.cs

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! First, it seems you may be missing a semicolon at the end of the statement. But the biggest problem here is that you're not outputting the exact string that they want. They want the string to be "Enter a book title: ". But you're outputting "My book title:". If it's not the exact string they want down to the capitalization and spacing (don't forget the trailing space after the colon), the challenge will fail. Give it another shot with the correct string! Hope this helps! :sparkles:

Thank You for the response, I'm a little confused on how this is working.. does it want me to do a string variable? I thought the questions was just asking me for the print method. Anyway, I put System.Console.Write("Star Wars:"); but its still saying its wrong I'm kind of lost and I watched the video three times

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

CJ Doyle No, you simply must use the string they give. They don't want you to enter your book title. They want you to print out "Enter a book title: " to the user.

Take a look:

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

If the string literal is anything other than "Enter a book title: ", the challenge will fail.

I did that too lol and that's not working as well..maybe there is a bug

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Maybe. Because if I copy/paste the code I posted above in the challenge, the challenge passes :smiley: At least the first step.