#include #include #include //for class string using namespace std; int main() { string a[] { "hole", "log", "bump", "frog", "wart", "fly", "flea", "smile" }; int n {size(a)}; //the number of objects for (int i {0}; i < n; ++i) { for (int j {0}; j < 2; ++j) { cout << "There's a "; for (int k {i}; k >= 0; --k) { cout << a[k]; //The log is "in", the rest of them are "on". if (k == 1) { cout << " in the "; } else if (k > 0) { cout << " on the "; } } cout << " in the bottom of the sea.\n"; } cout << "There's a hole, there's a hole.\n" << "There's a hole in the bottom of the sea.\n\n"; } return EXIT_SUCCESS; }