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.

Bryony Stewart
1,230 PointsParse returning 0
I have an int runningTotal = 0; that still returns 0 after a value as been entered.

Edward Ries
7,387 PointsWe need an example of your input and how it's assigned to runningTotal.
edited: Looks like you were adding your example as I typed this message.
1 Answer

Edward Ries
7,387 PointsTry moving the Console.WriteLine down below your if statement. Your showing runningTotal before you parse the entry and add it to runningTotal.

Bryony Stewart
1,230 PointsThank you!
Bryony Stewart
1,230 PointsBryony Stewart
1,230 Pointsusing System; namespace myPro {