Tribonacci Series C Program

C Program To Print Tribonacci Series

Learn how to print Tribonacci series in C programming language. The Tribonacci sequence is very similar to Fibonacci sequence.


What is a Tribonacci Sequence?

A Tribonacci sequence is a sequence of numbers in which the next number is found by adding the previous three consecutive numbers.

Note: The first three digits in a Tribonacci series is always 0, 1 and 2.

A Tribonacci Series consists of first digit as 0, second digit as 1 and third digit as 2. The next digit (fourth element) is dependent upon the preceding three elements. The fourth element is, therefore, the sum of previous three digits. This addition of previous three digits continues till the limit.

So, primarily Fibonacci series makes use of two preceding digits whereas tribonacci sequences makes use of three preceding digits

Example

0 1 2 3 6 11 20 37 68

Method 1: Print Tribonacci Series in C Programming using For Loop

Method 2: C Program To Generate Tribonacci Sequence using While Loop

Method 3: C Program To Print Tribonacci Sequence using Functions


Output

Print Tribonacci Series using For, While Loop using Functions in C Programming

In case you get any compilation errors in the above code to print Tribonacci sequence in C programming using For loop and While loop or if you have any doubts about it, let us know about it in the comment section below.

Recommended Programs
C Program To Print Fibonacci Series
C Program To Print Pascal Triangle
C Program To Solve Trapezoidal Rule
C Program To Find Execution Time of a Program
C Program For Arithmetic Progression
C Program To Convert Octal To Decimal Number
C Program To Count Trailing Zeros in Factorial of Number
C Program To Display Current Date and Time
C Program To Find Permutations of a String
C Program To Compare Two Strings
100+ C Programs For Programming Interviews

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

2 thoughts on “Tribonacci Series C Program

  • May 7, 2017 at 1:06 pm
    Permalink

    CodeLite is an amazing IDE. Thank you so much for getting it here. It’s better than Codeblocks.

    Reply
  • May 15, 2017 at 7:11 am
    Permalink

    Hey. This Tribonacci sequence seems to be so easy due to such a simple code. Thanks.

    Reply

Join The Discussion