ad

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

No comments:

Post a Comment