/*
Lauren Dukes
Key for Lab 3
*/

#include <stdio.h>

int main(void){
	int length;
	int width;

	printf("Enter an integer for length: ");
	scanf("%d",&length);
	printf("Enter an integer for width: ");
	scanf("%d",&width);

	int area = length * width;
	printf("The area of your rectangle is: \n");
	printf("%5d in decimal\n", area);
	printf("%5X in hexidecimal\n", area);
	printf("%5o in octal\n", area);

	//print the top of the rectangle
	int i = 0;
	for (i = 0; i < width; i++){
		printf("*");
	}
	printf("\n");

	//print the sides
	for (i = 0; i < length; i++){
		printf("*");
		int j = 0;
		for (j = 0; j < width-2; j++){
			printf(" ");
		}
		printf("*\n");
	}


	//print the bottom of the rectangle
	for (i = 0; i < width; i++){
		printf("*");
	}
	printf("\n");
	return 0;
}
