Try something like:

This is just a start for your code and a few fixes like letting them enter the number.. But you should do something like:

Make a MULTI-DIMENSIONAL DYNAMIC ARRAY

These represent tables.. Make it x by x. Print the array to the screen. that way how ever many digits they enter, it will do x across and x down.

PLEASE NOTE: I left the input as Integers.. so it will only output a Number.. you can figure out how to change it and make it multidimensional aswell.

```
/*This program will ask the user for a positive integer no greater than 15 and
will display a square on the screen using the character "X" with a length the
size of the number entered.*/
#include <iostream>
#include <new>
using namespace std;
int main ()
{
int i,n;
int * p;
cout << "Type A Number: ";
cin >> number;
p= new (nothrow) int[number];
if (p == 0)
cout << "Error: memory could not be allocated";
else
{
for (n=0; n<i; n++)
{
cout<<p[n] + "\n";
}
delete[] p;
}
return 0;
}
```

P.S. Your gunna need more than one LOOP.. This should almost work.. u can do the rest.

Example:

```
int number;
int number2;
int number3;
cout<<"bldfgsgds ";
cin>>number;
//U MUST DO SOME CHECKS HERE TO MAKE SURE IT IS A NUMBER!!!!!!!!!!!
number2 = number;
number3 = number;
number = 1;
do{
for(number=1;number2;number++)
{
cout<<"X";
}
cout<<"\n";
number++;
}while(number < number2);
```

I know you already made the program but I just wrote a completely new one because I was bored.

```
#include <iostream>
using namespace std;
int main() {
int number;
cout << "enter number: ";
cin >> number;
int i = 0;
char xs[number];
while(i<number) {
xs[i] = 'x';
i++;
}
i = 0;
while(i<number) {
cout << xs[i];
i++;
}
}
```

Or you could use double loops

this code is simpler and easy...

```
// This program will ask the user for a positive integer no greater than 15 and
will display a square on the screen using the character "X" with a length the
size of the number entered.
#include <iostream>
using namespace std;
int main ()
{
int number;
cin >> number;
if(number > 15){
cout <<"Your input must be less than 15!"; }
else {
for (int j=0; j < number; j++){
for(int i=0; i < number; i++){
cout << "X";
}
cout << endl;
}
system("pause");
return 0;
}
```

Hope this is helpful.

Now it should work lol. I modified it.

```
#include <iostream>
using namespace std;
int main() {
int number;
cout << "enter number: ";
cin >> number;
int i = 0;
char xs[number];
while(i<number) {
xs[i] = 'x';
i++;
}
int f = 0;
i = 0;
while(i<number) {
while(f<number) {
cout << xs[f];
f++;
}
cout << "\n";
i++;
f = 0;
}
}
```

```
#include <iostream>
using namespace std;
int main() {
int number = 55;
while(number>15) {
cout << "enter number: ";
cin >> number;
}
int i = 0;
char xs[number];
while(i<number) {
xs[i] = 'x';
i++;
}
int f = 0;
i = 0;
while(i<number) {
while(f<number) {
cout << xs[f];
f++;
}
cout << "\n";
i++;
f = 0;
}
}
```