Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(int argc, char **argv) {
- int i = 0;
- int c = 1;
- char buffer[1024];
- while (c != EOF) {
- c = fgetc(stdin);
- if ( (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ) {
- buffer[i++] = (char) c;
- continue;
- } else {
- if (i > 2 && (strncmp(buffer+i-3, "ing", 3) == 0 || strncmp(buffer+i-3, "ING", 3) == 0 ) ) {
- buffer[i] = 0;
- puts(buffer);
- }
- i = 0;
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment