So I need to make a program that prints a triangle of symbols in a certain direction.
For example:
Code:
How many rows? 3
@
@@@
@@@@@
but I can't figure out how to do that. It's rare that I post without figuring anything out, but I'm just simply not sure. I have a program that prints a triangle in a similar direction, so maybe if I could get some hints as to what to do with that (HINTS, not direct source code) it would help.
My code:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main ( ) {
int rows;
cout << "How many rows? ";
cin >> rows;
rows = rows + 1;
cout << endl;
for(int r = 0; r < rows; r++) {
for(int c = 0; c < r; c++) {
cout << "@";
}
cout << endl;
}
}