Thursday, 5 December 2019

Series Program in C 13



1 3 8 15 27 50 92 169 311

Code:

void main()
{
    int a=1, b=3, c=4, n=10, sum, i;
    printf("%d %d ",a,b,c);
    for(i=4; i<=n; i++)
    {
        sum = a+b+c;
        printf("%d ",sum);
      a = b;
      b = c;
      c = sum;
    }
}




More Pattern programs:











100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...