#include #include #include #include static int fin_de_phrase(int c) { return c == '.' || c == '?' || c == '!'; } int main(void) { setlocale(LC_CTYPE, ""); int debut_phrase = 1; int c; while ((c = getchar()) != EOF) { if (debut_phrase) { putchar(toupper(c)); debut_phrase = !isalpha(c); } else { putchar(tolower(c)); debut_phrase = fin_de_phrase(c); } } return EXIT_SUCCESS; }