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 trial

iOS Objective-C Basics (Retired) Fundamentals of C Operators & Expressions

Cong Nguyen
Cong Nguyen
2,346 Points

Auto 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
Damien Watson
27,419 Points

Hi 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. :)

Cong Nguyen
Cong Nguyen
2,346 Points

i dont quite understand what they mean by decrement the value, please add