:P
I was bored, so I made this C++ Program to draw an ASCII Triangle.
The first time i tried, I just started coding(no plan) and I phailed.
Then i made a plan for the logic and I won

Heres the code
Code:
#include <iostream>
using namespace std;
long userin = 0;
long currentheightcount = 0;
long currentspacecount = 0;
long neededspaces = 0;
long bottomwidth = 0;
void main(void)
{
//-------------------------------------------------------------------------------------
cout << "Hello, Welcome to my triangle drawer!\n" << "Please enter a height in | for the program to draw: ";
cin >> userin;
cout << "Thank you! Let the drawing begin!\n\n";
userin--;
//-------------------------------------------------------------------------------------
while (currentheightcount < userin)
{
cout << "|";
//---------------------------------------------------------------------------------
if (neededspaces != 0)
{
//-----------------------------------------------------------------------------
for(currentspacecount; currentspacecount != neededspaces; currentspacecount++)
{
cout << " ";
}
//---------------------------------------------------------------------------------
}
//---------------------------------------------------------------------------------
cout << "\\" << endl;
currentheightcount++;
neededspaces++;
currentspacecount = 0;
}
//-------------------------------------------------------------------------------------
bottomwidth = neededspaces;
cout << "|";
//-------------------------------------------------------------------------------------
for (bottomwidth; bottomwidth != 0; bottomwidth --)
{
cout << "_";
}
//-------------------------------------------------------------------------------------
cout << "\\";
cout << "\n\n\n";
}
__________________