Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define TABSIZE 8
- int main(void) {
- int i = 0;
- int c;
- while ((c = getchar()) != EOF) {
- if (c == '\t') {
- while (i < TABSIZE) {
- putchar(' ');
- i++;
- }
- i = 0;
- }
- else {
- putchar(c);
- if (c == '\n')
- i = 0;
- else {
- i++;
- if (i >= TABSIZE)
- i = 0;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement