/****************************************************************
 *	Module name  :	box.c                                   *
 *	Purpose      :	prints a rectangle using asterisks      *
 *	Created      :	??-??-89				* 
 *	Last edited  : 	24-08-89		Version 1.0	*
 * 	Copyright    :	G R Buckeridge				*
 ****************************************************************/

#include stdio.h

main()
	{
	int x,y;
	
	printf("This program prints a rectangle using asterisks\n\n");

	printf("Input width (greater than 2)  ");
	scanf(" %d",&x);
	printf("\n");	
	
	printf("Input length (greater than 2) ");
	scanf(" %d",&y);
	printf("\n");
	
	box(x,y);
	}


void hor(x)
int x;
	{
	int i;
	
	for (i=0;i<x;i++)
		printf("%c",'*');
	printf("\n");
	}


void box(x,y)
int x,y;
	{
	int i,j;
	
	hor(x);
	for (j=2;j<y;j++)
		{
		printf("%c",'*');
		for (i=2;i<x;i++)
			printf("%c",' ');
		printf("%s","*\n");
		}
	hor(x);
	}	
(j=2;j<y;j++)
		{
		printf("%c",'*');
		for (i=2;i<x;i++)