0
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a=0,b=1,c=1,d=0,e=0,x,n;
    printf("enter the limit: ");
    scanf("%d",&n);
    while(d<=n)
    {
        d=a+b+c;
        a=b;
        b=c;
        c=d;
        e=a+b+c;
        for(x=d+1;x<d;x++)
        {
            if(x<=n)
            {
                printf("the non tribonacci series is: ");
                printf("\n %d",x);
            }
        }
    }
    return 0;
}

actually how to do this it doesnot print the values

2
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by WaltP
0

actually wat i tried is first generate the tribonacci series and generate the next tribonacci series in advance and print the values in between them that is variable d which calculates tribonacci series and variable e calculates the next tribpnacci in advance and find the numbers in between them

0

Output the values you use in the loop and see what they generate.
When you see that the values are wrong, you then know what to look for to fix the problem.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.