Code Below:


class tribonacci
{
    public static void main()
    {
        int a=0,b=1,c=1,d,e;
        for (e=1;e<=10;e++)
        {
            System.out.print(a+" ");
            d=a+b+c;
            a=b;
            b=c;
            c=d;
        }
    }
}