24 lines
400 B
C
24 lines
400 B
C
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
|
|
int main(int argc, char const *argv[]) {
|
|
|
|
int c;
|
|
bool is_comment;
|
|
|
|
while ((c = getchar()) != EOF) {
|
|
if (c == '#') {
|
|
is_comment = true;
|
|
} else if (c != '\n' && is_comment) {
|
|
putchar(c);
|
|
} else if (c == '\n' && is_comment) {
|
|
putchar('\n');
|
|
is_comment = false;
|
|
} else {
|
|
// do nothing
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
}
|