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) 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!!!