#include #include #include using namespace std; int main(){ string mixed_case = "The elephant could not fit into the heat vent"; for(int i = 0; i < mixed_case.length(); i++) mixed_case[i] = toupper(mixed_case[i]); cout << mixed_case << endl; char c_mixed_case[] = "So it filled the heat vent with water instead"; for(char *i = c_mixed_case; *i; i++) *i = toupper(*i); cout << c_mixed_case << endl; string mixed_case_3 = "The water ran down the vent and dripped into the furnace"; for(string::iterator i = mixed_case_3.begin(); i != mixed_case_3.end(); i++) *i = toupper(*i); cout << mixed_case_3 << endl; string mixed_case_4 = "The furnace started to make weird sounds, which scared the elephant"; for(auto &i : mixed_case_4) i = toupper(i); cout << mixed_case_4 << endl; std::string mixed_case_5 = "That made a lot of noise, which scared a raccoon out of the attic"; std::transform(mixed_case_5.begin(), mixed_case_5.end(), mixed_case_5.begin(), ::toupper ); std::cout << mixed_case_5 << std::endl; return 0; }