: Hi,
:
: There is some spaces in the beginning of each line and won't be shown in the posted message, but shown in the reply screen.
:
:
: #include <iostream>
: using namespace std;
:
: #include <stdlib.h> // system()
:
:
: int main()
: {
:
: int rows_num; // height of triangle (number of rows)
: int i, j; // counters
:
: cout << "\nPlease enter the height of triangle (number of rows) : ";
: cin >> rows_num;
: cout << endl;
:
: int beg_sp = (rows_num-1)*2; // number of beginning spaces
:
: for (i=1; i<=rows_num; i++) // print each row
: {
: for (j=0; j<beg_sp; j++) // print beginning spaces
: cout << ' ';
: for (j=0; j<i; j++) // print stars
: cout << "* ";
:
: cout << endl; // goto next row
:
: beg_sp -= 2;
: }
:
: system("pause");
:
: return 0;
: }
:
: --------------------------------------
: - I don't have Time To waste The Time!
:
:
This goes for you as well:
http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=3&MsgID=358144
And this wasn't the first time you did it either.