#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include<stdio.h>
int main(int argc, char** argv) {

	int n, a, b, x, y;
	printf("Please enter a length:");
	scanf("%d", &n);

	a = 1;

	b = n;

	for (x = 1; x <= n; x++)

	{
		for (y = 1; y<n; y++)
		{
			if ((a == y) || (y == b))
			{
				printf("x ");

			}
			else

			{

				printf("  ");

			}

		}

		if ((x == 1) || (x == n))

		{

			printf("x");

		}
		else

		{4

			printf(" ");

		}

		printf("\n");
		a++;
		b--;

	}

	system("PAUSE");

}
