#include<stdio.h>
int main()
{
int n=5; //size
int i,j;
for(i=1; i<=n; i++)
{
for(j=1; j<=n; j++)
{
if((j==1||j==n)||(i==1||i==n))
printf("*");
else
printf("#");
}
printf("\n");
}
return 0;
}
#include<iostream.h>
int main()
{
int n=5;
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++)
{
if((j==1||j==n)||(i==1||i==n))
cout<<"*"; //any symbol
else
cout<<"#"; //any symbol
}
cout<<endl;
}
return 0;
}
class PatternProg
{
public static void main(String args[])
{
int n=5; //size
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++)
{
if((j==1||j==n)||(i==1||i==n))
System.out.print("*"); //ANY SYMBOL
else
System.out.print("#"); //ANY SYMBOL
}
System.out.println();
}
} //end of main
} //end of class
using System;
class PatternProg
{
public static void Main()
{
int n = 5; //size
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= n; j++)
{
if ((j == 1 || j == n) || (i == 1 || i == n))
{
Console.Write("*"); //ANY SYMBOL
}
else
{
Console.Write("#"); //ANY SYMBOL
}
}
Console.WriteLine();
}
Console.ReadKey(true);
} //end of main
} //end of class
n = 5 # size
for x in range(1, n + 1):
for y in range(1, n + 1):
if ((y == 1 or y == n) or (x == 1 or x == n)):
print("*", end="")
else:
print("#", end="")
print()