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 trialBryony 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,388 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,388 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 {