New Want to Write for Computaholics ? if Yes Contact us at "contact@computaholics.in"

c program to print given number pattern

Write a c program to print given number pattern
1
2 3
3 4 5
4 5 6 7
5 6 7 8 9
6 7 8 9 10 11

#include<stdio.h>

int main()
{
    int i,m,n;
    for(i=1;i<=6;i++)
    {
        m=i;
        for(n=1;n<=i;n++)
        {
            printf("%d ",m++);
        }
        printf("\n");
    }
}

Copyright © C Program | Java | OpenGL Programming | Hadoop at Computaholics