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, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
question
Engineering, 04.07.2019 18:10
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
question
Engineering, 04.07.2019 18:10
Shafts are machine elements that are used to a) carry axial loads b) direct shear loads c) transmit power d) rotate at constant speed e) none of the above circular and square shafts subjected to the same torque under the same circum behave a) the same way b) almost the same way
Answers: 2
question
Engineering, 04.07.2019 18:10
Which from the following instrument is commonly used to detect the high pitch butzing sound in bearings? [clo4] a)-digital ultrasonic meter b)-infrared camera c)-spectroscopic d)-vibrometer
Answers: 2
You know the right answer?
Using c++

1. implement a recursive method fibo that takes an integer num as a parameter...
Questions
question
Mathematics, 22.07.2019 07:30
question
Mathematics, 22.07.2019 07:30
question
Mathematics, 22.07.2019 07:30
question
Mathematics, 22.07.2019 07:30