
Mark L. answered 08/15/21
Friendly Tutoring Specializing in AP and Introductory Computer Science
Hi Avery.
There are a few steps to think about in order to answer this question correctly:
- Declare two int variables. -- This depends on the language you're using, but should be something you can quickly Google how to do if you don't already know how.
- Test whether a number is negative or positive -- How would you test this? Hint: What makes a number negative or positive? Once you answer that, use a numerical comparison operator to answer the question ( like '<', '>', etc.) Bonus: Is 0 a positive number?
- Use boolean operators to answer the question. -- How would you break down the question using boolean logic? (such as a logical AND or logical OR operator, etc.)
Feel free to follow up with me.
-Mark