Contact Learn C
Copy

Program 385: Symbol Hollow Square Pattern

Program 385: Symbol Hollow Square Pattern
 
#include<stdio.h>
main()
{
 int i,size,j;
 printf("Enter size\n");
 scanf("%d",&size);
 for(i=1;i<=size;i++)
 {
  for(j=1;j<=size;j++)
  {
   
   if(i==1||i==size||j==1||j==size)
   {
    printf("*");
   }
   else
   {
    printf(" ");
   }
  }
  printf("\n");
 }
}
Explanation:
 //Coming Soon


Output:
Symbol Hollow Square Pattern


Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide