// Program to print alphabet Z 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==1 || i==5 ) || j==5-i+1)
printf(" *"); // allow space and star
else
printf(" "); // allow double space
}
printf("\n"); //for new line
}
return 0;
}
Output:
* * * * *
*
*
*
* * * * *
No comments:
Post a Comment