#C65. Capitalize the Words
Capitalize the Words
Capitalize the Words
Given a sentence, write a program to transform it into a new sentence where the first character of each word is capitalized and the rest of the word is in lowercase. The program should ignore any extra leading or trailing whitespace. Only alphabetic characters will be modified for capitalization; any non-alphabetic characters remain unchanged in their original positions.
For example:
hello world
becomesHello World
python IS fun!
becomesPython Is Fun!
4th of JULY
becomes4th Of July
javaSCRIPT is aweSOME
becomesJavascript Is Awesome
Your solution must read input from stdin and print the result to stdout.
inputFormat
The input consists of a single line: a sentence which may contain spaces, letters, digits, and punctuation. Leading and trailing spaces should be ignored.
outputFormat
Output a single line containing the transformed sentence where each word is capitalized as described.
## samplehello world
Hello World