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 Formatting Output

Not understanding the instructions for this 3rd step; Are the instructions telling me to write the program to Append

the word rocks to the user's entry requested from the string firstName or is it assuming that I am going to understand that I have to "Prompt the User in code" to write rocks to the screen and then for that entry and then append it?

I have watched this video more than I have spent on the Entire course So Far!!!!!!!!!!!

2 Answers

Steven Parker
Steven Parker
229,788 Points

I'm not sure which "this video" you mean, but the third challenge step is to append (add on) to the name you already have stored in the variable firstName. You add to a string using the + as the "concatenation operator":

    // after you have read in the name (from step 1)...
    firstName += " rocks!";   // this is short for:  firstName = firstName + " rocks!";
    Console.WriteLine(firstName);  // this part is the same as step 2.

So the only difference from step 2 is that the name printed out will now have a bit extra added to it. The challenge does not ask you to "Prompt the User in code" for anything.

Seth Kroger
Seth Kroger
56,413 Points

You should have already read in firstName from the first step, and then printed it out in the second step. The third step is asking you to do the same thing as the second, but add " rocks!" after the name.