Print? Description
Enter an English sentence and change the first letter of each word to an uppercase letter.
Input
The input data contains multiple test instances. Each test instance is an English sentence of no more than 100 characters, occupying one line.
Output
Output the modified English sentence as required.
Sample Input
I like acm
I want to get an accepted
Sample Output
I Like Acm
I Want To Get An Accepted
Description
Enter an English sentence and change the first letter of each word to an uppercase letter.
Input
The input data contains multiple test instances. Each test instance is an English sentence of no more than 100 characters, occupying one line.
Output
Output the modified English sentence as required.
Sample Input
I like acm
I want to get an accepted
Sample Output
I Like Acm
I Want To Get An Accepted
[Plain] # include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int length;
Int flag;
Char string [100];
While (gets (string )! = NULL)
{
Length = strlen (string );
Flag = 1;
For (I = 0; I <length; I ++)
{
If (flag)
{
String [I] = string [I]-32;
}
If (string [I] = '')
{
Flag = 1;
}
Else
{
Flag = 0;
}
}
Puts (string );
}
Return 0;
}
# Include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int length;
Int flag;
Char string [100];
While (gets (string )! = NULL)
{
Length = strlen (string );
Flag = 1;
For (I = 0; I <length; I ++)
{
If (flag)
{
String [I] = string [I]-32;
}
If (string [I] = '')
{
Flag = 1;
}
Else
{
Flag = 0;
}
}
Puts (string );
}
Return 0;
}