// This program generates an ascii art triangle. // Write a function that takes the height // and symbol as arguments. #include using namespace std; // Write function prototype here int main() { const int height = 20; string symbol = "*"; // Move this code into a function and replace with a function call // START for(int i = 1; i <= height; i++) { for(int k = height; k > i; k--) { cout << " "; } for(int j = 0; j < (i*2-1); j++) { cout << symbol; } cout << endl; } // END return 0; } // Write function definition here