Question: Program 1: Math operations: (x-7) + (x % 3) (25 marks) Write a program in Assembly that will (a) obtain an integer x from the

Program 1: Math operations: (x-7) + (x % 3) (25 marks) Write a program in Assembly that will (a) obtain an integer x from the user, (b) change x to (x * 2) ifx is less than 10, (c) use x in this mathematical formula: (x-7) + (x % 3)-result, and then (d) print the formula used (using x or (x * 2)) and the result. Ensure the code is commented thoroughly. Some sample runs are shown below. Other input values would produce different results x is less than 10 (Formula shows (x* 2) not x) x is over 10 (Formula shows x) (Formula shows x) Enter an integer x: 4 Enter an integer 11 Enter an integer x: 10 Program 1: Math operations: (x-7) + (x % 3) (25 marks) Write a program in Assembly that will (a) obtain an integer x from the user, (b) change x to (x * 2) ifx is less than 10, (c) use x in this mathematical formula: (x-7) + (x % 3)-result, and then (d) print the formula used (using x or (x * 2)) and the result. Ensure the code is commented thoroughly. Some sample runs are shown below. Other input values would produce different results x is less than 10 (Formula shows (x* 2) not x) x is over 10 (Formula shows x) (Formula shows x) Enter an integer x: 4 Enter an integer 11 Enter an integer x: 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
