Menu

Write Lmc Programs Complete Following Tasks May Need Use Brz Brp Br Commands Well Task Sub Q43794431

Write LMC programs tocomplete the following tasks. You may need to use the BRZ, BRP andBR commands here as well. For each task you should submit annotatedmnemonics:

  1. Ask the user for two numbersand multiply the two numbers and print out the product.
  2. Ask the user for two numbersand divide them and print out the quotient and the remainder.
  3. Ask the user for two numbersand print out the biggest.

Forexample:    Test data: 7, 9; Expected output:9

Test data: 9, 7;Expected output: 9

  1. Ask the user for two numbers.If they are the same then print 0, otherwise add them and print outthe answer.

For example:

Test data: 3, 9;Expected output: 12

Test data: 7, 7;Expected output: 0

  1. Ask the user for one largernumber and one factor of that number (e.g. 15 and 3, 20 and 5). Theprogram should keep subtracting the smaller number until it reaches0 – where it should print out 0.

Expert Answer


Answer to Write LMC programs to complete the following tasks. You may need to use the BRZ, BRP and BR commands here as well. For e…

OR