Hint: You can hit "edit post", highlight your code and then press the <> formatting button. This will not automatically indent your code. That part is up to you.
I've found it's easiest to copy and paste pre-indented code directly from the IDE, that way it is already properly formatted.
You can use the "preview" button at the bottom to see how it looks.
Also, delete the system ("PAUSE");, it is unnecessary and it will cause compiler errors if you give your code to someone else.
#include <iostream>
int main ()
{
for (int i = 0; i < 7; i++)
{
for (int n = i; n < 6; n++)
{
std::cout << "*";
}
for (int m = 0; m < i+2; m++)
{
std::cout << " ";
}
std::cout << " ";
for (int j = i; j < 13; j++)
{
std::cout << "/";
}
if (i != 0)
{
for (int k = 0; k < i+1; k++)
{
std::cout << "\\";
}
}
// Probably should put an else in here, for error checking
std::cout << " ";
for (int p = 0; p < i+2; p++)
{
std::cout << " ";
}
for (int q = i; q < 6; q++)
{
std::cout << "*";
}
std::cout << std::endl;
}
// unnecessary and will cause portability issues
//system("PAUSE");
// not needed but makes a good break point
return 0;
}