ack/lang/b/distr/examples/5_while.b

11 lines
206 B
Brainfuck
Raw Permalink Normal View History

2016-11-27 10:37:25 +00:00
main() {
auto c;
while (1) {
while ( (c=getchar()) != ' ')
if (putchar(c) == '*n') exit();
putchar( '*n' );
while ( (c=getchar()) == ' '); /* skip blanks */
if (putchar(c)=='*n') exit();
}
}