// CS 2 Lab 0 #include void main() { // const int height = 8; int height; cout << "Enter Height = "; cin >> height; for(int i = 1; i <= height; i++) { for(int j = 0; j < height - i ; j++) cout << ' '; for(int m = 0; m < 2 * i - 1; m++) cout << 'X'; cout << endl; } }