int main() {std::string sentence;std::cout << "Enter a sentence: ";std::getline(std::cin, sentence);
}
int main() {
bool capitalizeNext = false;std::string sentence;
std::cout << "Enter a sentence: ";
std::getline(std::cin, sentence);
for (int i = 0; i < sentence.length(); i++) {
if (sentence[i] == ' ') {
capitalizeNext = true;
} else if (capitalizeNext && (sentence[i - 4] == 'd' && sentence[i - 3] == 'i' && sentence[i - 2] == 'e')
|| (sentence[i - 4] == 'd' && sentence[i - 3] == 'e' && sentence[i - 2] == 'r')
|| (sentence[i - 4] == 'd' && sentence[i - 3] == 'a' && sentence[i - 2] == 's')) {
sentence[i] = toupper(sentence[i]);
capitalizeNext = false;
}
}
std::cout << "Modified sentence: " << sentence << std::endl;
return 0;
}