1, 1, 2, 3, 5...
Fibonachi starts at one and the next number is the two before it added. BUT this is Tribonacci and you have to add the three before it! You will get a number to start on and you shuld output a vecter containing the next ten numbers.
fn tribonacci (startn: i32) -> Vec<i32> {
//You're solution!
}
// Add your tests here.
// See https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_add() {
assert_eq!(tribonacci(1), [1, 1, 2, 4, 7, 13, 24, 44, 81, 149]);
assert_eq!(tribonacci(8), [8, 8, 16, 32, 56, 114, 202, 372, 688, 1262]);
}
}