Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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