Lang:GCC
Edit12345678910111213141516171819202122232425262728293031#include<stdio.h>#include<stdlib.h>#include<string.h>#include<ctype.h>char letters[100000];char article[100][10000];int main(){int j,i = 0,k = 0,l = 0;while((letters[i] = getchar())!= EOF){i++;}for(j = 0; j < i; j++){if(letters[j] == '\n'){article[l][k] = '\0';k = 0;if(strlen(article[l])!=0) l++;}else if(letters[j]!=' '){if(j >= 1 && letters[j-1] == ' ' && !ispunct(letters[j]))article[l][k++] = ' ';if(letters[j]>='a'&& letters[j]<='z'){if(k == 0 || (k >=2 && article[l][k-2] == '.'))letters[j] = letters[j]-32;}else if(letters[j]>='A' && letters[j]<= 'Z')if(!(k >=2 && article[l][k-2] == '.')&& k > 0)letters[j] = letters[j]+32;article[l][k++] = letters[j];}