#include <stdio.h>
int main(void){
int c = 0, linestarted = 0;
printf("Input some characters, then press Ctrl+D./n");
while ((c = getchar()) != EOF)
if (c == ' ' || c == '/t' || c == '/n') {
if (!linestarted) {
putchar('/n');
linestarted = 1;
}
} else {
putchar(c);
linestarted = 0;
}
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266657.html