You are on page 1of 2

NOTE: All the assignments must have comment to explain the code.

If not the teacher will not


understand your code and you will receive ZERO mark. If two people have the same
submission then they will receive half of the mark for each.

Assignment 1
Problem 1:

Write a program let user enter number elements of an array. After that let user input the array of
positive integer. Count and print the quantity of odd numbers in the array.

Problem 2:

Write a program let user enter a number n from keyboard and calculate the sum of digits of n. Print the
result.
Assignment 2
Problem 1: A man buys a pack of candy with N candies and plans to divide it equally among his 3
children. But the man realized that each of them already had some of their own candies in the order
that the first child had A, the second child had B, and the third child had C. He wants to find a way to
divide the candies so that after dividing, all 3 of them have an equal number of candies. Help the man
see if he can do it by writing an Assembly program that enters 4 integers in the order A, B, C, and N and
prints out "YES" if he can and "NO" otherwise.

Problem 2: Write an assembly program, let user input a number from keyboard. Check if the number is a
prime or not and show the result.

You might also like