Question: MIPS question Write a program to print out a series of numbers. First input a number N for the size of the list. This should

MIPS question

Write a program to print out a series of numbers. First input a number N for the size of the list. This should not be more than 20. Next, you need to calculate F(i) for each number 0..N. This means you should print out F(0), F(1), , F(N-1) for a total of N numbers including the zeroth number. Your series is defined as follows:

F(0) = 2

F(1) = 5

F(i) = F(i-1) + F(i-2) + 1

Like problem #2, the program should exit if the value entered for N is 0, otherwise the program should run again.

So the following would be a sample program output:

Please enter a value for N: 7

2 5 8 14 23 38 62

Please enter a value for N: 6

2 5 8 14 23 38

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!