Write a program that reads in a sentence of up to 100 characters and outputs the sentence with spacing corrected and with letters corrected for capitalization. In other words, in the output sentence, all strings of two or more blanks should be compressed to a single blank. All the words in the sentence should start with an uppercase. Treat a line break as if it were a blank space, in the sense that a line break and any number of blank spaces are compressed to a single blank space. Assume that the sentence ends with a period and contains no other periods. For example, the input
The correct answer has not yet been found for the question. Our moderators are looking for the most suitable solutions for you. Could you share your comments with us for the answer to this question?