#include
int main(void){
char s[300],*p;
printf("Enter a English sentence...\n");
if(fgets(s,300,stdin)){
for(p=s;*p;p++)
if(p==s || *(p-1)==' '){
if(*p>='a' && *p<='z')
*p&=0xDF;
}
else if(*p>='A' && *p<='Z')
*p|=0x20;
printf("%s\n",s);
}
else
printf("Input error, exit...\n");
return 0;
}
#include
int main()
{
char sentence[200],*p;
gets(sentence);
p=sentence;
if(*p>='a'&&*p<='z') *p=*p-32;
while(*++p!='\0')
{
if(*(p-1)==' '||*(p-1)=='.'||*(p-1)=='?'||*(p-1)=='!')
{
if(*p>='a'&&*p<='z') *p-=32;
}
else if(*p>='A'&&*p<='Z') *p+=32;
}
puts(sentence);
return 0;
}