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