Added a solution for exercise 1.12. Skipped 1.10 and 1.11 due to simplicity.
This commit is contained in:
parent
e67db44312
commit
a7ee3c350e
1 changed files with 12 additions and 0 deletions
12
KNR Redux/ex1-12.c
Normal file
12
KNR Redux/ex1-12.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(){
|
||||
int c = 0;
|
||||
while((c = getchar()) != EOF){
|
||||
if(c == ' '|| c == '\t'){
|
||||
putchar('\n');
|
||||
} else
|
||||
putchar(c);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue