#include<iostrea.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
int main()
{int x=0,y=1,ctx=79,cty=48,ax,bx,i=2,w=2;
 clrscr();
 while(x!=y)
 {
   for(x;x<=ctx;x++)
   {
     gotoxy(x,y);
     cout<<"*";
     delay(50);
     clrscr();
   }
   for(y;y<=cty;y)
   {
     gotoxy(x,y);
     cout<<"*";
     delay(50);
     clrscr();
   }
   for(x;x>=i;x--)
   {
     gotoxy(x,y);
     cout<<"*";
     delay(50);
     clrscr();
   }
   for(y;y>w;y--)
   {
    gotoxy(x,y);
     cout<<"*";
     delay(50);
     clrscr();
  }
 ctx--;
 cty--;
 w++;
 i++;
 }
getch();
return 0;
}
