// Program to print alphabet Y in C with C Bhasha Gyan
#include<stdio.h>
int main()
{
int i, j;
for (i=1; i<=6; i++)
{
printf("\t"); //for horizontal tab
for(j=1; j<=6; j++)
{
if(( i==j && i<=3) || j==6-i+1)
printf("*"); // for star
else
printf(" "); // for single space
}
printf("\n"); //for new line
}
return 0;
}
Output:
* *
* *
**
*
*
*
No comments:
Post a Comment