We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f647b commit b2c17bcCopy full SHA for b2c17bc
chapter_1/exercise_1_12/copy_io_nl.c
@@ -1,18 +1,18 @@
1
-#include <stdio.h>
2
-
3
-int main()
4
-{
5
- char c;
6
- char last_char = -1;
7
- while ((c = getchar()) != EOF) {
8
- if(c==' ' || c=='\t' || c=='\n'){
9
- if(last_char!=' ' && last_char!='\t' && last_char!='\n'){
10
- putchar('\n');
11
- }
12
13
- else {
14
- putchar(c);
15
16
- last_char=c;
17
18
-}
+#include <stdio.h>
+
+int main()
+{
+ char c;
+ char last_char = -1;
+ while ((c = getchar()) != EOF) {
+ if(c==' ' || c=='\t' || c=='\n'){
+ if(last_char!=' ' && last_char!='\t' && last_char!='\n'){
+ putchar('\n');
+ }
+ else {
+ putchar(c);
+ last_char=c;
+}
0 commit comments