Search C Program | nimishsoft@gmail.com

Series Program - 12

1 3 8 15 27 50 92 169 311
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;
    }
}


Related Links:
- More Series Programs
- Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C

1 comment:

  1. Program to generate a series of ‘N’ numbers based on the pattern of the numbers as : 9 13 22 36 55 79

    ReplyDelete