#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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.