Search C Program | nimishsoft@gmail.com

Number Pattern - 50

1
1 2
3 4 5
12 13 14 15
54 55 56 57 58
280 281 282 283 284 285

#include <stdio.h>

int main()
{
    int i, j, k=1, l;
    for(i=1;i<=6;i++)
    {
        l = k;
        k = 0;
        for(j=1;j<=i;j++)
        {
            printf("%d ",l);
            k = k + l;
            l++;
        }
        printf("\n");
    }
    return 0;
}


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


3 comments: