subject

Write a MASM program to calculate Fibonacci numbers:
1. Display the program title and your name. Then get the user's name and greet the user.
2. Prompt the user to enter the number of Fibonacci terms to be displayed. Advice the user to enter an integer in the range [1 - 46).
3. Get and validate the user input.
4. Calculate and display all of the Fibonacci numbers up to and including the nth term. The results should be displayed 5 terms per line with at least 5 spaces between terms.
5. Display a goodbye message that includes the user's name and terminates the program.
Requirements:
1. The main procedure must be divided into the following sections:
a. Introduction
b. User instructions
c. Get the data
d. Calculate and display Fibonacci numbers
e. Say goodbye
2. The loop that implements data validation must be implemented as a post-test loop.
3. The loop that calculates the Fibonacci terms must be implemented using the MASM loop instruction.
4. The upper and lower limits should be defined as constants
5. All the requirements regarding documentation, readability, user-friendliness apply.
Notes:
1. You can display the Fibonacci numbers as they are generated. You don't need to store them.
2. The first two Fibonacci terms are both 1. All other terms are the sum of the two previous terms. E. g. term-3 = term-1 + term-2
Example execution (user input is in italics):
Fibonacci Numbers
Programmed by Leonardo Pisano
What's your name? Jerry
Hello, Jerry
Enter the number of Fibonacci terms to be displayed
Give the number as an integer in the range (1 .. 46).
How many Fibonacci terms do you want? 50
Out of range. Enter a number in [1 ..46]
How many Fibonacci terms do you want?
1 2 3 4 5
8 13 21 34 55
89 144 233 377
Results certified by Leonardo Pisano.
Goodbye, Jerry

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
You know the right answer?
Write a MASM program to calculate Fibonacci numbers:
1. Display the program title and your na...
Questions
question
Mathematics, 09.03.2020 01:10
question
Mathematics, 09.03.2020 01:10
question
Mathematics, 09.03.2020 01:10
question
Mathematics, 09.03.2020 01:10
Questions on the website: 13722367