Friday, August 23, 2019

hollow Square in c language. Pattern 9

Holo Square:


Holo Square in cprograms.


*****
*      *
*      *
*      *
*****


#include<stdio.h>
#include<conio.h>

void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
{
if(i==1||j==1||i==5||j==5)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
getch();

}


EmoticonEmoticon