// Uses nested for loops for print a triangle of *'s to the screen. #include void main() { int i, j, n; cout << "Enter a positive integer: "; cin >> n; for (i=1; i <= n; i++) { for (j=1; j <= i; j++) cout << "*"; cout << endl; } }