Box Example
============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int length;
cout<<"Enter The Length of the Box: ";
cin>>length;
int total=length*length;
for (int i=1;i<=total;i++)
{
if (i<length||i>total-length||i%length==1)
cout<<"*";
else if (i%length==0)
cout<<"*"<<endl;
else
cout<<" ";
}
getch();
}
[Link]
FARHAN: 03008855006