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 trialolu adesina
23,007 PointsCANT SEEM TO GET THIS QUESTION RIGHT HELP
NOT SURE IN WHAT ORDER TO DO THIS HELP
olu adesina
23,007 Pointsoh sorry it was question 7
Steven Parker
231,269 PointsOK, this quiz is always the same. But for future reference, many quizzes scramble the question order each time, so it's better to quote the entire question.
1 Answer
Steven Parker
231,269 PointsIt's a matter of operator precedence and associativity.
The operator precedence of multiplication and division is the same, and the associativity is left-to-right, so you would do the division first, and then the multiplication.
But be aware of the number types, both division operands are integers, so the rules for integer math will apply there. But since one of the multiplication operands is a double, the double rules will apply to that part.
For future reference, here's a handy chart of Precedence and Associativity of C Operators.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou didn't say which question (the quiz has 7).