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
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Machinery that is a key part of the process and without which the plant or process cannot function is classifed as: (clo4) a)-critical machinery b)-essential machinery c)-general purpose machinery d)-none of the specified options.
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
Mathematics, 24.12.2019 01:31
question
Mathematics, 24.12.2019 01:31
question
Mathematics, 24.12.2019 01:31
question
Mathematics, 24.12.2019 01:31
Questions on the website: 13722362