/* Computer Science & Programming Jason M. Snouffer Wednesday, October 9, 2002 Lab 6 Problem 11 This program uses 2 sets of very complex nested for loops containing complex nested conditional statements to output a hollow equilateral triangle, with its outline consists of a symbol chosen by the user, except for every third row where the fixed symbol '!' is outputted instead; the height of the triangle is determined through user input. This program also uses a do while loop to validate that the user inputted value for the height is between 1 and 10. Test Suite: Input Output: 5, # # ## ! ! # # # # ! ! # # ## ! 4, @ @ @@ ! ! @ @ @ @ ! ! @@ @ 0 invalid input 11 invalid input 10 x xx ! ! x x x x ! ! x x x x ! ! x x x x ! ! x x x x ! ! x x x x !! x All of the sample inputs within this test suite were tested and performed as expected. */ #include #include using namespace std; int main () { int col, row, input_base, spaces, universal_row(1); char symbol; const char FIXED_SYMBOL('!'); do { cout<<"Please enter the height of the equilateral triangle (between 1 and 10): "; cin>>input_base; } while(input_base < 1 || input_base > 10); cout<<"Please enter the symbol you would like to output: "; cin>>symbol; //top half for(row = 1; row <= input_base; row++) { for(spaces = input_base; spaces > row; spaces--) { cout<<" "; } for(col = 1; col <= row; col++) { if (col == 1 || col == row) { if(universal_row%3 == 0) { cout< row; col--) { if (col == input_base || col == row + 1) { if(universal_row%3 == 0) { cout<