Character Star Asterisk Pattern Series Programs in C

Character Star Asterisk Pattern Series Programs in C

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

C Language की विशेषताओं एवं शक्तियों को जानने के लिए देखें—Features and Powers of C

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

Character Star Asterisk Pattern Series Programs in C

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

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

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

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

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

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

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

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

Write a C program to generate/print following reverse right aligned right angle pattern/series:

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

Other Pattern Series Programs in C

  1. Alphabet Letter Patterns
  2. Number Digit Patterns
Share it to:

Published by

admin

I am a computer teacher, programmer and web developer