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 trialJorge Kalil
1,832 Pointsstring heightInput = Console.ReadLine(); int height = int.Parse(heightInput);
Why won't you accept this as resolution to the exercise
string heightInput = "0";
int height = int.Parse(heightInput);
1 Answer
William Li
Courses Plus Student 26,868 PointsThe 1st line of code given by challenge was.
string heightInput = "168";
Somehow you changed its value from 168 to 0, that's what's causing the code to fail, because altering the value of this variable has side-effect on the height variable on line 2 as well.