#include<iostream.h> #include<conio.h> void main(){ clrscr(); int s; cout<<"enter the size of box: "; cin>>s; for(int i=1;i<=s;i++){ cout<<endl; for(int j=1;j<=s;j++) { if(i>1 && i<s && j>=2 && j<s){ cout<<" "; } else cout<<"*"; }} getch(); }
Post a Comment