Word Length,
Subject content:
Your program needs to read a line of text, separated by spaces as several words, ended. You need to output the length of each word in this line of text. The words here are irrelevant to the language and can contain various symbols. For example, "it's" is a word with a length of 4. Note that consecutive spaces may appear in the row.
Input Format:
Enter a line of text in a row and end with '.'. The ending period cannot be within the length of the last word.
Output Format:
Output the length of the word corresponding to this line of text in one line. Each length is separated by a space. There is no final space at the end of the line.
Input example:
It's great to see you here.
Output example:
4 5 2 3 3 4
# Include <stdio. h>
Int main ()
{Int I = 0;
Char;
While (1 ){
Scanf ("% c", & );
If (a = '.'){
If (I! = 0 ){
Printf ("% d", I );
}
Printf ("\ n ");
Break;
}
If (a = ''){
If (I! = 0 ){
Printf ("% d", I );
I = 0;
}
}
Else {
I + = 1;
}
}
Return 0;
}