/ Published in: C

Expand |
Embed | Plain Text
/* replaces tab with -> */ #include <stdio.h> int main (int argc, const char * argv[]){ int c; c=getchar(); while(c!=EOF){ if(c=='\t'){ c='-'; putchar(c); c='\b'; putchar(c); c='>'; putchar(c); c=getchar(); } else if(c=='\b'){ /* funktioniert irgendwie nicht */ c='-'; putchar(c); c='\b'; putchar(c); c='<'; putchar(c); c=getchar(); } else{ putchar(c); c=getchar(); } } }
You need to login to post a comment.