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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, nickddj12
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, jack487
How can a user delete a drawing object
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, kp2078
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
image
Computers and Technology, 23.06.2019 19:30, 123iamthe1
You can apply several different worksheet themes from which tab?
Answers: 1
You know the right answer?
Write a MASM program to calculate Fibonacci numbers:
1. Display the program title and your na...

Questions in other subjects:

Konu
Engineering, 01.06.2021 17:50
Konu
Mathematics, 01.06.2021 17:50