Help with code

I'm trying to make a program that drawas a box. I've tried to rewrite it several ways but can't get it.

using namespace std;
bool drawOn;
const int width = 30;
const int height = 10;


void drawBox()
{
int k = 0;
for (int j = 0; j < width; j++) //top line
{
if (int j = 0)
{
for (int k = 0; k < height; k++)
{
cout << "#";
cout << endl;
}
}
for (int j = 1; j < height;)
{
for (int k = 0; k < height; k++)
{
if (int k = 0)
cout << "#";
cout << endl;
for (int k = 1; k < height;)
cout << " ";
cout << endl;
if (int k = width)
cout << "#";
cout << endl;
}

}
for (int j = width; k < height; k++)
cout << "#";
cout << endl;

}







system("PAUSE");




}

int main()
{
drawOn = true;
while (drawOn)
{
drawBox();
}




return 0;
}
Topic archived. No new replies allowed.