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...
Write a program in java to determine whether a given function F from the set {0,1,2,3,...,m}...
Write a program in java to determine whether a given function F from the set {0,1,2,3,...,m} to (0,1,2,3,...,n} is one-to-one and/or onto. The inputs to your program will be: - an integer m - an integer n, and - a two dimensional boolean array F of size (m+1) x (n+1), where F[ i , j ] = 1 if F(i) = j.
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT