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 trialWillem Folscher
303 PointsChallenge Task 2 of 2 Add 10 to height and store result back into height.
string heightInput = "168"; int height = int.Parse(heightInput);
ok so , please explain to me where I need to add the 10 to? Sorry a bit confused here
3 Answers
Chase Marchione
155,055 PointsHi Willem,
I managed to find the challenge--to receive faster answers, I recommend mentioning which challenge/course you are referencing, so that people know exactly which task you're discussing.
For this step, you need to add 10 to height. There are two common ways one might go about solving this:
height = height + 10;
Or
height += 10;
string heightInput = "168";
int height = int.Parse(heightInput);
height += 10;
Hope this helps!
Rune Andreas Nielsen
5,354 PointsFrom what it sounds like to me, you should just add 10 to the height. So it will look like this.
string heightInput = "168"; int height = int.Parse(heightInput); height = height + 10;
You can also do it this way string heightInput = "168"; int height = int.Parse(heightInput); height += 10;
Willem Folscher
303 PointsYeah thank you, had a blank moment there, appreciated kindly