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