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 trialCong Nguyen
2,346 PointsAuto decrement the variable named unstable: int unstable = 25; unstable -= 5; unstable++; IDK what they want
Auto decrement the variable named unstable:
int unstable = 25; unstable -= 5; unstable++;
they ans should be 21, because 25-5+1 = 21 i have been trying and not sure what they want. please help
2 Answers
Damien Watson
27,419 PointsHi Cong,
The question is asking you to decrement the value, not what 'unstable' should now equal. Each question is unique but they are just showing previous for reference.
Decrement is minus, so the reverse of unstable++;
Sorry for being cryptic, I'm trying to help without giving you the answer. :)
Damien Watson
27,419 PointsYou got it, nice work.
Cong Nguyen
2,346 Pointsi dont quite understand what they mean by decrement the value, please add
Cong Nguyen
2,346 PointsCong Nguyen
2,346 PointsAns
unstable --;