ad

Monday, June 2, 2025

C program to Print Alphabet Pstar pattern

 C program to Print  Alphabet  R star pattern 

Star pattern C program to Print  Alphabet  R

Star pattern C program to Print  Alphabet  R
Example 


#include <stdio.h>
int main()
{
    int rows;
    printf("Enter Rows = ");
    scanf("%d", &rows);


    for (int a = 0; a < rows; a++)
    {
        for (int b = 0; b < rows; b++)
       {
            if ((a == 0 || a == rows / 2) && (0 < b < rows - 1))
         {
                printf("*");
            }
            else if ((a != 0) && (b == 0 || (b == rows - 1 && a < rows / 2 )))
            {
                printf("*");
            }
            else if(b == a && a >= rows / 2)
            {
                printf("*");
            }
            else
            {
            printf(" ");
         }
        }
        printf("\n");
    }
    return 0;
}


Star pattern C program to Print  Alphabet  R
Example 

Star pattern C program to Print  Alphabet  R

Related Post :-

C program to print alphabet C star pattern

C program to print-alphabet B star pattern

C program to Print A star pattern Asterisks pattern

C program to Print Alphabet P star pattern

 C program to Print  Alphabet  P star pattern 

C program to Print  Alphabet  P star pattern
star pattern C program to Print  Alphabet  P
Example 


#include <stdio.h>

int main()
{
    int a, b;
    int n = 7; // height of P

    for (a = 0; a < n; a++)
{
        for (b = 0; b <= n; b++)
{
            // Print * for the left vertical line of P
            if (b == 0 || (a == 0 && b < n) || (a == n / 2 && b < n)
|| (b == n && a != 0 && a <= n / 2))
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}

C program to Print  Alphabet  P star pattern 
Output


C program to Print  Alphabet  P star pattern


Related Post :-

C program to print alphabet h star

C program to print alphabetG star

C program to print alphabet F star

Sunday, May 25, 2025

C program to Print Alphabet O star pattern

 

 C program to Print  Alphabet  O star pattern 

C program to Print  Alphabet  O star pattern


C program to Print  Alphabet  O star pattern 
Example 


#include <stdio.h>

int main()
{
    int a, b;
    int n = 7; // height and width of the O

    for (a = 0; a < n; a++)
{
        for (b = 0; b < n; b++)
{
            // Print * for the boundary of O
            if ((a == 0 || a == n-1) && (b > 0 && b < n-1)
|| (b == 0 || b == n-1) && (a > 0 && a < n-1))
                printf("*");
            else
                printf(" ");
       
}

        printf("\n");

    }

    return 0;
}


C program to Print Alphabet N star pattern

 C program to Print  Alphabet  N star pattern 


C program to Print  Alphabet  N star pattern


C program to Print  Alphabet  N star pattern 
Example 


#include <stdio.h>

int main()
{
    int a,b;
    int n = 7; // height of the N (can be adjusted)

    for (a = 0; a < n; a++)
{
        for (b = 0; b < n; b++)
{
            // Print * for the first column, last column, and diagonal
            if (b == 0 || b == n - 1 || b == a)
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}


C program to Print  Alphabet  N star pattern 
Output

C program to Print  Alphabet  N star pattern

Related Post :-


C program to print alphabet k star Pattern

C program to prin alphabet j star Pattern

Friday, May 23, 2025

C program to Print Alphabet L star pattern

                                            C program

C program to Print  Alphabet  L star pattern


C program to Print  Alphabet  L star pattern 
Example 


#include <stdio.h>

int main() {
    int a,b;
    int n = 7; // height of the L

    for (a = 0; a < n; a++)
{
        for (b = 0; b < n; b++)
{
            // Print * for the left vertical line and the bottom horizontal line
            if (b == 0 || (a == n - 1 && b < n))
{
                printf("*");
            } else {
                printf(" ");
            }
        }
        printf("\n");
    }

    return 0;
}


C program to Print  Alphabet  L star pattern 
Output


C program to Print  Alphabet  L star pattern




Related Post :-

c program to print hollow square star

Thursday, May 22, 2025

C program to Print Alphabet K star pattern

                                                C program

C program to Print  Alphabet  k star pattern

C program to Print  Alphabet  J star pattern 
Example 

#include <stdio.h>

int main()
{
    int a, b;
    int height = 7;
// Height of the K

    for(a = 0; a < height;a++)
{
        printf("*");
// First vertical line

        for(b = 0; b < height;b++) {
            if (a + b == height / 2 || a - b == height / 2)
{
                printf("*");
            } else {
                printf(" ");
            }
        }
        printf("\n");
    }

    return 0;
}
 


C program to Print  Alphabet  K star pattern 
Output


Related Post :-

C program to print alphabet G star


Sunday, April 27, 2025

C program to Print Alphabet J star pattern

 C program

C program to Print  Alphabet  J star pattern
C program to Print  Alphabet  J star pattern 
Example 


#include <stdio.h>

int main()
{
    int a, b;
    int n = 7;
// Height of the J pattern

    for (a = 0; a < n; a++)
{
        for (b = 0; b < n; b++)
{
            // Print the vertical part of J
           
if (b == n / 2 && a != 0 ||
                (a == n - 1 && b <= n / 2) ||
                (a == n - 2 && b == 0))
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}



C program to Print  Alphabet  J star pattern 
Output

C program to Print  Alphabet  J star pattern

Related Post :-


C program to print alphabet G star

Saturday, April 26, 2025

C program to Print Alphabet H star pattern

 C Program

C program to Print  Alphabet  H star pattern

C program to Print  Alphabet  H star pattern 
Example:-


#include <stdio.h>

int main()
{
    int a, b;
    int n = 7;
    for (a = 0; a < n; a++)
{
        for (b = 0; b < n;b++)
{
            if (b == 0 || b == n - 1 || a == n / 2)
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}


C program to Print  Alphabet  H star pattern 

Output:-

C program to Print  Alphabet  H star pattern

Related Post :-

C program to print alphabet b star

C program to Print A star pattern Asterisks pattern

Friday, April 25, 2025

C program to Print Alphabet G star pattern

C Program

C program to Print  Alphabet  G star pattern


C program to Print  Alphabet  G star pattern 
Example :-


#include <stdio.h>

int main() {
    int a, b;
    int n = 7;

    for (a = 0; a < n; a++) {
        for (b = 0; b < n; b++) {
           
            if ((a == 0 ||a == n - 1) && b > 0 && b < n - 1)
                printf("*");
           
            else if ((b == 0 && a > 0 && a < n - 1))
                printf("*");
           
            else if ((a == n / 2 && b >= n / 2) || (a >= n / 2 && b == n - 1))
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}


C program to Print  Alphabet  G star pattern 
Output :-


C program to Print  Alphabet  G star pattern

Related Post :-

C program to print alphabet e star

Thursday, April 24, 2025

C program to Print Alphabet F star pattern

 C Program

C program to Print  Alphabet  F star pattern

C program to Print  Alphabet  F star pattern 

Example :-


#include <stdio.h>

int main() {
    int a, b;
    int rows = 7;  

    for (a = 0; a < rows; a++) {
        for (b = 0;  b < rows; b++) {
           
            if (a == 0)
                printf("*");
           
            else if (a == rows / 2 && b < rows - 2)
                printf("*");
           
            else if (b == 0)
                printf("*");
            else
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}

C program to Print  Alphabet  F star pattern 

Output 

C program to Print  Alphabet  F star pattern

Related Post :-

C program to print alphabet b star

C program to Print A star pattern Asterisks pattern

Wednesday, April 23, 2025

C program to Print Alphabet I star pattern

C program 

C program to Print  Alphabet  I star pattern

C program to Print  Alphabet  I star pattern 
Example 



#include <stdio.h>

int main() {
    int a, b;
    int n = 7;  
    // print of the I

    for (a = 0; a < n; a++) {
        for (b = 0; b < n; b++) {
           
            // Print * for the top, middle, and bottom rows
           
            // or the vertical column in the middle
           
            if (b == n / 2 || a == 0 || a == n - 1) {
                printf("*");
            }
            else
            {
                printf(" ");
            }
        }
        printf("\n");
    }

    return 0;
}

C program to Print  Alphabet  I star pattern 

Output


C program to Print  Alphabet  I star pattern

Related Post :-

C program to print hollow full pyramid

C program to Print Alphabet E star pattern

  C program

C program to Print  Alphabet E star pattern

C program to Print  Alphabet E star pattern 

Example


#include <stdio.h>

int main() {
    int a,b;
    int height = 7;
    int width = 5;  

    for (a = 0; a < height;a++) {
        for (b = 0; b < width; b++) {
           
            if (b == 0 || (a == 0 || a == height / 2 || a == height - 1))

          printf("*");

        else

          printf(" ");

        }

        printf("\n");
   
}

    return 0;

}

C program to Print  Alphabet E star pattern  
Output 

C program to Print  Alphabet E star pattern

Related Post :-

C program to print alphabet c star