First, I imagine you want (or you have been asked to do) to have a variable that contains the "height" of the triangle, e.g.:

int height = 5;

And given only this value, generate dynamically the...