Starting from:
$30

$24

Lab 8 Problem Solution

In this assignment, you will write a program calculates [Tetranacci numbers](http://mathworld.wolfram.com/TetranacciNumber.html).




The formula for the `n`th Tetranacci number **T<subn</sub** is defined as follows:




- T<sub0</sub = 0




- T<sub1</sub = 1




- T<sub2</sub = 1




- T<sub3</sub = 2




- T<subn</sub = T<subn-1</sub + T<subn-2</sub + T<subn-3</sub + T<subn-4</sub




You need to complete following tasks:




1. Your task is to implement a recursive function `tetranacci` which accepts an integer `n` (you may assume that `n = 0`), and computes the `n`-th Tetranacci number.




2. Print on the screen first 10 Tetranacci numbers.

More products