#include #include #include #include using namespace std; int main(){ string name{"bison\n"}; const char *name_c = "bison\n"; printf("The string is: %s\n", name_c); printf("Here's name: %s%s\n", name.c_str(), " are living in my living room and making a big mess. They ate all my plants. They slobbered on my couch. They broke the TV."); name.reserve(300); for(int i = 0; i < 10; i++){ for(char i = 'a'; i <= 'z'; i++) name += i; name += "\n"; } cout << name; vector entries; cout << "Enter values, enter -1 to stop\n"; while(1){ int entry; cin >> entry; if(entry == -1) break; entries.push_back(entry); } // calculate median sort(entries.begin(), entries.end()); cout << "Median: " << entries[entries.size() / 2] << endl; return 0; }