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

I dont know what to do!!!

I really dont know what this means!!!

CodeChallenge.cs
string bookTitle = "Ability Mindscape";
System.Console.Write("Enter a book title: ");

2 Answers

Carlos Federico Puebla Larregle
Carlos Federico Puebla Larregle
21,073 Points

First you create a variable called "bookTitle", second you assign a value to it (a string value in this case), third you are going to prompt to the console a message asking for a "book". Finally you are going to use the "ReadLine()" function so you can "catch" the user's input.

string bookTitle = "Ability Mindscape";
System.Console.Write("Enter a book title: ");
bookTitle = System.Console.ReadLine();

I hope that helps a little bit

Adrian Reszka
Adrian Reszka
4,555 Points

to put it in to steps . 1 step (1 line) : Create variable named bookTitle of type string and assign a text string of "Ability Mindscape" to this variable.

2 step (2 line) : System.Consol.Write - its basicly a method taken from c# libary, treat is as a keyword used to print somthing in the console. the thing in the "()" is the value that will be printed.

;)