Spiral matrix in C

This program accepts the number of rows and columns as input and then fills the matrix m in spiral format.

#include < stdio.h >
#include < conio.h > 
void main()
{
	int m[20][20],i,j;
	int lc,hc,lr,hr,r,c,cnt;	
	clrscr();
	printf("\nEnter r & c :");
	scanf("%d %d",&r,&c);
	cnt = 1;
	lr = 0; lc = 0;
	hr = r - 1;
	hc = c - 1;
	while ( lr <=hr && lc <= hc )
	{
		i = lr;
		for(j=lc;j <= hc;j++)
		{
			m[i][j] = cnt++;	
			j = hc;
			for(i=lr+1;i<=hr;i++)
			{
				m[i][j] = cnt++;	
				if( lr != hr )
				{
					i = hr;
					for(j=hc-1;j>=lc;j--)
					m[i][j] = cnt++;
				}	
				if ( lc != hc )
				{
					j = lc;
					for(i=hr-1;i>lr;i--)
					m[i][j] = cnt++;
				}
			}
		}
		lr++;lc++;
		hr--;hc--;
	}//while	
	printf("\nSpirally filled matrix is\n");
	for(i=0;i < r;i++)
	{
		for(j=0;j < c;j++)
		{
			printf("%4d",m[i][j]);
			printf("\n");
		}		
	}
} // main