Question: PLEASE ANSWER CORRECTLY .... THANK YOU.! programming language java or C Section 2: Programming Problems (20 points) Write a program that uses a loop to

PLEASE ANSWER CORRECTLY .... THANK YOU.!
programming language java or C
Section 2: Programming Problems (20 points) Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n-1) + Fib(n - 2). Place each value in the EAX register and display it with a call DumpRegs statement inside the loop. (10 points) Write a program that uses addition and subtraction to set and clear the Carry flag. After each instruction, insert the call DumpRegs statement to display the registers and flags. Using comments, explain how and why the Carry flag was affected by each instruction. (10 points) Section 2: Programming Problems (20 points) Write a program that uses a loop to calculate the first seven values of the Fibonacci number sequence, described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n-1) + Fib(n - 2). Place each value in the EAX register and display it with a call DumpRegs statement inside the loop. (10 points) Write a program that uses addition and subtraction to set and clear the Carry flag. After each instruction, insert the call DumpRegs statement to display the registers and flags. Using comments, explain how and why the Carry flag was affected by each instruction. (10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
