Number Digits Pattern Series Programs in C

Number Digits Pattern Series Programs in C

Looping और iterative statements के बारे में और अधिक जानने के लिए देखें— Looping statements in C

Switch statement और multibranching statements के बारे में अधिक जानने के लिए देखें—Switch statements in C

C Language के बारे में अधिक जानने के लिए देखें—Brief Introduction of C

Number Digits Pattern Series Programs in C

Write a C program to generate/print following number digit rectangle pattern/series:

11111
11111
11111
11111
11111
#include<stdio.h>
int main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=5;j++)
        {
            printf("1");
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following number digit right angle pattern/series:

1
11
111
1111
11111
#include<stdio.h>
int main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("1");
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following number digit repeatedly increasing right angle pattern/series:

1
22
333
4444
55555
#include<stdio.h>
int main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d",i);
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following number digit increasing right angle pattern/series:

1
12
123
1234
12345
#include<stdio.h>
int main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d",j);
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following number digit sequentially increasing right angle pattern/series:

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
#include<stdio.h>
int main()
{
    int i,j,k=1;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d\t",k);
            k++;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following odd number digit sequentially increasing right angle pattern/series:

1
3 5
7 9 11
13 15 17 19
21 23 25 27 29
#include<stdio.h>
int main()
{
    int i,j,k=1;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {

            printf("%d\t",k);
            k=k+2;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following even number digit sequentially increasing right angle pattern/series:

2
4 6
8 10 12
14 16 18 20
22 24 26 28 30
#include<stdio.h>
int main()
{
    int i,j,k=2;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {

            printf("%d\t",k);
            k=k+2;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following binary pattern/series:

1
0 1
0 1 0
1 0 1 0
1 0 1 0 1
#include<stdio.h>
int main()
{
    int i,j,k=1;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            if(k%2==0)
            printf("0");
            else
            printf("1");
            k++;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following binary pattern/series:

0
1 0
1 0 1
0 1 0 1
0 1 0 1 0
#include<stdio.h>
int main()
{
    int i,j,k=1;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            if(k%2==1)
            printf("0");
            else
            printf("1");
            k++;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following even number digit horizontally increasing right angle pattern/series:

2
2 4
2 4 6
2 4 6 8
2 4 6 8 10
#include<stdio.h>
int main()
{
    int i,j,k;
    for(i=1;i<=5;i++)
    {
        k=2;
        for(j=1;j<=i;j++)
        {
            printf("%d\t",k);
            k=k+2;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following odd number digit horizontally increasing right angle pattern/series:

1
1 3
1 3 5
1 3 5 7
1 3 5 7 9
#include<stdio.h>
int main()
{
    int i,j,k;
    for(i=1;i<=5;i++)
    {
        k=1;
        for(j=1;j<=i;j++)
        {
            printf("%d\t",k);
            k=k+2;
        }
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following even number digit repeatedly increasing right angle pattern/series:

2
4 4
6 6 6
8 8 8 8
10 10 10 10 10
#include<stdio.h>
int main()
{
    int i,j,k=2;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d\t",k);
        }
        k=k+2;
        printf("\n");
    }
    return 0;
 }

Write a C program to generate/print following even number digit repeatedly increasing right angle pattern/series:

1
3 3
5 5 5
7 7 7 7
9 9 9 9 9
#include<stdio.h>
int main()
{
    int i,j,k=1;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d\t",k);
        }
        k=k+2;
        printf("\n");
    }
    return 0;
 }

Important Pattern Series Programs in C

  1. Asterisk Star Patterns
  2. Alphabet Letter Patterns
Share it to: