Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created March 17, 2015 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomcha/97a977f9dc51c801875c to your computer and use it in GitHub Desktop.
Save tomcha/97a977f9dc51c801875c to your computer and use it in GitHub Desktop.
1-17
#include <stdio.h>
#define MAXLINE 1000
int main(){
int c;
int i,j;
char line[MAXLINE];
i = 0;
while((c = getchar()) != EOF){
line[i] = c;
if( c == '\n'){
if( i > 7){
printf("%s", line);
}
i = 0;
}else{
i++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment