Write a program that accepts as input a sentence in which all of the words are run together, but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string “StopAndSmellTheRoses.” would be converted to

Chapter 9, Programming Challenges #14

This problem has been solved!


Do you need an answer to a question different from the above? Ask your question!

Write a program that accepts as input a sentence in which all of the words are run together, but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string “StopAndSmellTheRoses.” would be converted to “Stop and smell the roses.”

Related Book For answer-question

Starting Out With Java From Control Structures Through Data Structures

6th Edition

Authors: Tony Gaddis

ISBN: 9780133957051