Question

In: Computer Science

Write an Assembley Language.Given a number x, determine whether the given number is Armstrong number or...

Write an Assembley Language.Given a number x, determine whether the given number is Armstrong number or not. A positive integer of n digits is called an Armstrong number of order n(where order is the number of digits) if.

   abcd... = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) + ....

Example:

  • Input : 153 Output : Yes, 153 is an Armstrong number. 1*1*1 + 5*5*5 + 3*3*3 = 153
  • Input : 120 Output : No, 120 is not a Armstrong number. 1*1*1 + 2*2*2 + 0*0*0 = 9
  • Input : 1253 Output : No, 1253 is not a Armstrong Number 1*1*1*1 + 2*2*2*2 + 5*5*5*5 + 3*3*3*3 = 723
  • Input : 1634 Output : Yes, 1*1*1*1 + 6*6*6*6 + 3*3*3*3 + 4*4*4*4 = 1634

HINT: Use the ReadString function found in the Irvine32 library to capture the user's input.

Solutions

Expert Solution

PROGRAM TO FIND THE GIVEN INTEGER IS ARMSTRONG OR NOT IN ASSEMBLY LANGUAGE

SAMPLE INPUT OUTPUT :


Related Solutions

in PYTHON Determine whether a number provided by the user is perfect or not. write a...
in PYTHON Determine whether a number provided by the user is perfect or not. write a program that: 1. Ask the user for a positive integer 2. Compute the list of integer divisors of the given number 3. Check whether the given number is perfect 4. Communicate the result to the user (something like ‘Your number…. Is a perfect number’ or ‘Your number ….. is not a perfect number’. 5. In any case, communicate to the user the list of...
Determine whether the given differential equation is exact. If it is exact, solve it. i) (x...
Determine whether the given differential equation is exact. If it is exact, solve it. i) (x 3 + y 3 )dx + 3xy2 dy = 0, Ans. x 4 + 4y 3x = C ii) (y ln y − e −xy) + (1 y + x ln y) dy dx = 0, Ans. not exact iii) (e −x sin y − 3)dx − (3x 2 − e x sin(2y))dy = 0, Ans. not exact iv) (xy − 1)dx + (x...
For the following exercises, determine whether or not the given function f is continuous everywhere...f(x) = log2 (x)
For the following exercises, determine whether or not the given function f is continuous everywhere. If it is continuous everywhere it is defined, state for what range it is continuous. If it is discontinuous, state where it is discontinuous.f(x) = log2 (x)
For the following exercises, determine whether or not the given function f is continuous everywhere...f(x) = tan(x) + 2
For the following exercises, determine whether or not the given function f is continuous everywhere. If it is continuous everywhere it is defined, state for what range it is continuous. If it is discontinuous, state where it is discontinuous.f(x) = tan(x) + 2
For the following exercises, determine whether or not the given function f is continuous everywhere....f(x) = 2x + 5/x
For the following exercises, determine whether or not the given function f is continuous everywhere. If it is continuous everywhere it is defined, state for what range it is continuous. If it is discontinuous, state where it is discontinuous.f(x) = 2x + 5/x
For the following exercises, determine whether or not the given function f is continuous everywhere....f(x) = sec(x) − 3.
For the following exercises, determine whether or not the given function f is continuous everywhere. If it is continuous everywhere it is defined, state for what range it is continuous. If it is discontinuous, state where it is discontinuous.f(x) = sec(x) − 3.
determine whether the given function is even, odd, or neither. Please write a code in MatLab...
determine whether the given function is even, odd, or neither. Please write a code in MatLab to solve this problem below: 1.f(x) = sin 3x please only use Matlab to solve this problem
An Armstrong number is a number that is the sum of its own digits, each raised...
An Armstrong number is a number that is the sum of its own digits, each raised to the power of the number of its digits. For example, 153 is considered an Armstrong number because 13 + 53 + 33 = 153. Write a VBA program that lists all 3-digit Armstrong numbers within a specified range of 3-digit positive integers. Your sub should do the following: 1) Using two input boxes, ask the user to input two 3-digit positive integers (a...
Consider a numeric vector x (e.g., x=c(2,3,-1,1.2,2.6,0)), write the R code that determine whether each element...
Consider a numeric vector x (e.g., x=c(2,3,-1,1.2,2.6,0)), write the R code that determine whether each element of x is (Verify that your code work correctly): (a) positive (b) non-positive (c) even or odd (d) an integer
Determine whether or not the random variable X is a binomial random variable. (a) X is...
Determine whether or not the random variable X is a binomial random variable. (a) X is the number of dots on the top face of a fair die (b) X is the number of hearts in a five card hand drawn (without replacement) from a well shuffled ordinary deck. (c) X is the number of defective parts in a sample of ten randomly selected parts coming from a manufacturing process in which 0.02% of all parts are defective. (d) X...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT