C Program
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:-
No comments:
Post a Comment