Important note: The code must be written for WinMIPS64 . Please don\'t respond i
ID: 3803987 • Letter: I
Question
Important note: The code must be written for WinMIPS64. Please don't respond if you can't provide WinMIPS64 code. And, for the love of all that is holy, do not just run the C code through a MIPS converter! That is not WinMIPS64 and you will just be wasting both of our time.
Fibonacci numbers are: 0,1,1,2,3,5,8,13,21,34,55,etc i.e. two consecutive numbers are added to generate the next number. If the user enters 6, then the display should be 0, 1, 1, 2, 3, 5 i.e. 6 fibonacci numbers should be displayed. Write the code for WinMIPS64. Generate the numbers and display it. The sample C code is:
#include
main()
{
int x,y,z,num,count;
printf( "Enter the number of fibonacci numbers > 2: ");
scanf("%d",&num);
x = 0;
y = 1;
count = 2;
printf( "The numbers are: ");
printf("%d %d ",x,y);
while(count {
z = x + y;
printf( "%d ",z);
x = y;
y = z;
count++;
}
}
Again all examples can be used for manipulation. Note that the numbers displayed are integers. Provide a complete report of your code i.e. stall count, code size, CPI.
Explanation / Answer
using namespace std;
02
#include <iostream>
03
#include <string>
04
05
struct CorpData
12
13
int setQ(int qtr, double f)
18
return 0;
19
}
20
};
21
22
int main (int argc, char * const argv[]) ;
27
for (int i = 0; i < 4; i++) alphabetic character = 0; letter of the alphabet < 4; q++) using namespace std;
02
#include <iostream>
03
#include <string>
04
05
struct CorpData
12
13
int setQ(int qtr, double f)
18
return 0;
19
}
20
};
21
22
int main (int argc, char * const argv[]) ;
27
for (int i = 0; i < 4; i++) alphabetic character = 0; letter of the alphabet < 4; q++)