For example:
The input string: There are 100 students in the room.
Output The converted string: There Are 100 Student In The Room.
1) programming thoughtU use gets () or cin. Getline () input string containing Spaces,
U set a character variable for the current character of precursor variable, when the current characters to lowercase letters and precursors for Spaces to transform, otherwise the cursor backwards and the current character set as precursor character, until the end of the string
CodePudding user response:
String according to the space in the array, traverse the judge first character to capital replacement back, print is ok