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 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
Answers: 2
question
Computers and Technology, 24.06.2019 17:00
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
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
Physics, 20.10.2019 13:00
question
Mathematics, 20.10.2019 13:00
Questions on the website: 13722361