Reference no: EM13938567
I need help to writing a program "VC++.net" with the specified input and output.
Use a computational program or programs you have written to do the following exercises.
Given any non-negative integer n,
a.Find the nth Fibonacci number using iteration.
b.Find the nth Fibonacci number using recursion.
c.Compare the number of operations and the CPU time needed to compute Fibonacci numbers recursively vs. that needed to compute them iteratively.
Maybe these pseudocodes been helpful;
A Recursive Algorithm for Fibonacci Numbers.
Procedure fubonacci(n: nonnegative integer)
If n = 0 then Fibonacci(0) := 1
else if n = 1 then fiponacci(1) :=1
else fibonacci(n) := Fibonacci (n - 1) + fibnacci(n - 2)
An Iterative Algorithm for computing Fibonacci Numbers.
Procedure iterative Fibonacci (n : nonnegative integer )
If n=0 then y:=0
else
begin
x := 0
y := 1
For i := 1 to n - 1
begin
z := x + y
x := y
y := z
end
end
Analysis based on a self-designed fictitious study
: For this assignment you will undertake an analysis based on a self-designed fictitious study that utilizes statistical analyses. You will first develop a fictitious problem to examine. It can be anything.
|
Stockholm conference on the human environment
: The 1972 Stockholm Conference on the Human Environment had three major products: The Action Plan to protect the global environment; the United Nations Environment Programme and the related Environment Fund; and the Stockholm Declaration on the Hum..
|
Describe pathological processes involved in degeneration
: Describe the pathological (disease) processes involved in degeneration and herniation and of the vertebral disks and how these disease processes represent an alteration from the normal physiology of the vertebral column.
|
Why did the controller compute depreciation expense
: Why did the controller compute depreciation expense on the financial statements as he or she did? What are the possible consequences of the controller's decision on the amount of depreciation expense?
|
Compare the number of operations and the cpu time
: Compare the number of operations and the CPU time needed to compute Fibonacci numbers recursively vs. that needed to compute them iteratively.
|
The program outputs the area of the floor in square feet
: a) Write a Pseudocode to represent the logic of a program that allows the user to enter values for the width and length of a room's floor in feet. The Program outputs the area of the floor in square feet.
|
State the research approach to investigate the issue
: My assignment is about a research proposal of my own chosen subject. Mine is: (an evaluation of the nurse to patient ratio for the registered nurses working in stroke wards in Australian hospitals and it's impact on patient's risk of morbidity and..
|
Write a pseudocode to represent the logic of a program
: Write a pseudocode to represent the logic of a program that allows the user to enter two values. the program outputs the product of the two values.
|
How drug tolerance and conditioning may factor into outcome
: Jim has taken heroin for the past 5 years. One day, Jim and Jack go out and both use large quantities of heroin. Although both did the same amount of drugs, Jack dies from an overdose. Discuss how drug tolerance and conditioning may factor into th..
|