// Program to print alphabet X in C with C Bhasha Gyan
#include<stdio.h>
int main()
{
int i, j;
for (i=1; i<=5; i++)
{
printf("\t"); //for horizontal tab
for(j=1; j<=5; j++)
{
if( i==j || j==5-i+1)
printf("*"); // allow star
else
printf(" "); // allow space
}
printf("\n"); // for new line
}
return 0;
}
Output:
*        *
  *    *
     *
  *    *
*        *
 


 
No comments:
Post a Comment