X792: Punctuate sentence in C++

Write a function called punctuate that receives a string and permanently changes the value of that same string so that if there is a letter in the first element, it should be made upper-case and add a period . to the end if the last element has any character other than the following: .,!,?. However, if there is nothing in the string, it should not be changed.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.