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