Hi there, this code outputs an asterisk triangle with a straight edge down the left, I cant for the life of me figure out how to reverse it so that the straight line is down the right! Any advice is welcome :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
int main()
{
int i, j, rows=5;
for (i = 1; i <= rows; ++i)
{
for (j = 1; j <= i; ++j)
{
cout << "*";
}
cout << "\n";
}
system("pause");
return 0;
}