Write a C program to print the pattern of holow rectangle.
#include<stdio.h>
#include<conio.h>
void main()
{ int i,j,n,m;
clrscr();
printf(“Enter no. of rows to print rectangular matrix:”);
scanf(“%d”,&n);
printf(“Enter no. of columns:”);
scanf(“%d”,&m);
for(i=0;i<n;i++)
{ for(j=0;j<m;j++)
{ if(i==0 || i==(n-1) || j==0 || j==(m-1))
{ printf(“*”);
}
else
{ printf(” “);
}
}
printf(“\n”);
}
getch();
}