#include<stdio.h>#defineStLEN10intmain(){char word[StLEN];puts("Enter strings (empty line to quit):");while(fgets(word,StLEN,stdin)!=NULL&&word[0]!='\n')fputs(word,stdout);puts("Done.");return0;}
#include<stdio.h>#defineStLEN10intmain(){char word[StLEN];int i;puts("Enter strings (empty line to quit):");while(fgets(word,StLEN,stdin)!=NULL&&word[0]!='\n'){
i=0;while(word[i]!='\n'&&word[i]!='\0') i++;if(word[i]=='\n') word[i]='\0';elsewhile(getchar()!='\n')continue;puts(word);}puts("done.");return0;}