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) Perform if / else

Errors galore

So basically I'm creating a if / else statement and i get three errors:

error 1 = "Program.cs(15,85): error CS1009: Unrecognized escape sequence `\ ' "

error 2 = "Program.cs(15,85): error CS1056: Unexpected character `\0020' "

error 3 = "Program.cs(15,98): error CS1010: Newline in constant "

Would be helpful if anyone could tell me what's wrong :)

Code :

https://w.trhou.se/imst20wmh5

Thanks in Advance!

2 Answers

If you take a close look at your "quit", you have:

Console.Write("Enter how many minutes you have exercised or type \"quit"\ to exit: ")

The problem here is that you have you're second back slash at the wrong place, you simply have to put it before your "" 's:

Console.Write("Enter how many minutes you have exercised or type \"quit\" to exit: ");

So Like this: \"quit\"

Hope this helps!!

P.S. take a look at the bottom of the page, there's "Markdown Cheatsheet", it makes it easier to read your code.

Thanks!!!