Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <cstdio>int main(){int blank = 0, end = 1;int pos;char c;while(~scanf("%c", &c)){if (c == '.'){putchar(c);end = 1;}else if (c == ' '){blank = 1;}else if (c == '\n'){putchar('\n');end = 1;blank = 0;}else if (c == ','){putchar(',');}else {if (end){if (c > 'Z'){c -= 32;}}else{if (c < 'a'){c += 32;}}if (blank){putchar(' ');}