Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- int i;
- char text[200];
- printf("Entre com um texto :\n");
- gets(text);
- for (i = 0; i < strlen(text); i++)
- {
- if ((text[i] == 'w' && text[i+1] == 'e' && text[i+2] == 'b') && (text[i+3] == ' ' || text[i-1] == ' '))
- {
- printf("Texto possui a palavra 'web'!\n");
- return 0;
- }
- }
- printf("Texto nao possui a palavra 'web'!\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment