Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Using LMC code for an assignment

I have to test a sequence. I can enter the first few numbers but stuck on if test number is greater than the second? I can enter and load numbers, but to test if one is greater than the other, do I use BRZ? if greater than zero then what? I have the site atkinson.yorku in front of me if that is all I need, I just would really like some clarification as to how to use it.
0
knewtoit
Asked:
knewtoit
1 Solution
 
cookreCommented:
Yes, you'll probably use a BRZ, you don't know the context yet.

If you subtract A from B and the result is zero, what does that tell you about the relationship between A an B?

Now, if the result is not zero and positive, what does that tell you?

So, you might do something like:

1) if a-b is zero go do they're the same
2) if it was positive, A must have been larger, so go deal with that
3) Otherwise B was larger, so deal with that.


So, it looks like you'll have both BRZ and BRP.
0
 
knewtoitAuthor Commented:
Thanks very much I like the way you have broken down the question.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now