subject
Engineering, 19.12.2019 23:31 farashka03

Using c++

1. implement a recursive method fibo that takes an integer num as a parameter and returns the nth
fibonacci number.
2. implement a recursive method printdigits that takes an integer num as a parameter and prints its
digits in reverse order, one digit per line.
3. implement a recursive method mult that takes two integer parameters, x and y and returns their
product. (x*y = x*(y-1)+y. you should know not all computers provide 'product' as an operator. some computers can only do two operations, plus and minus)
4. write a program that tests the three methods above.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Slip occurs via two partial dislocations because of (a) the shorter path of the partial dislocation lines; (b) the lower energy state through partial dislocations; (c) the charge balance.
Answers: 1
question
Engineering, 04.07.2019 18:10
Hydraulic fluid with a sg. of 0.78 is flowing through a 1.5 in. i.d. pipe at 58 gal/min. the fluid has an absolute viscosity of 11.8 x 105 lbf-sec/ft2. is the flow laminar, turbulent or within the critical range? give both a numerical reynolds number and a term answer.
Answers: 3
question
Engineering, 04.07.2019 18:20
Aheavily insulated piston-cylinder device contains 0.02 m3 of steam at 300 kpa and 200 °c. 1.2 mpa. d this process. team is now compressed in a reversible manner to a pressure of etermine the entropy change and the work done on the steam during this process
Answers: 1
You know the right answer?
Using c++

1. implement a recursive method fibo that takes an integer num as a parameter...
Questions
question
English, 29.04.2021 20:40
question
Mathematics, 29.04.2021 20:40
question
Physics, 29.04.2021 20:40
question
Mathematics, 29.04.2021 20:40
question
Physics, 29.04.2021 20:40
Questions on the website: 13722359