[SOLVED] CSE341-Assignment Lab 04 Soved

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Task 01

Write a program which takes in two 16 bit numbers and finds the total sum of all the numbers that are divisible by 4 within that range.

Task 02

Find the sum of the following sequence using loops and print the result

a.   3 – 6 + 9 – 12 + 15 – 18 + 21

Task 03

Write a program which stores a large number in AX, stores another smaller number in BX. Now ask whether the user wants to divide or multiply. User will give ‘D’ for Division or ‘M’ for Multiplication. If the user wants to divide, then perform AX / BX using repeated subtraction and print the final remainder. And if the user wants to multiply then perform AX * BX using repeated summation and then print the final result.  You will not be able to use the “DIV” or the “MUL” function here. And you do not have to take overflow into account i.e. the test cases should be done without using any numbers which can cause overflow.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.