Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main(int argc, char** argv)
- {
- char text[5] = {'0', '0', '0', '0', '\0'};
- int attempts = 0;
- while(strcmp(text, "love") != 0)
- {
- text[0] = rand() % 255;
- text[1] = rand() % 255;
- text[2] = rand() % 255;
- text[3] = rand() % 255;
- attempts++;
- }
- printf("TRUE %s HAS BEEN FOUND and it only took %d attempts\n", text, attempts);
- getchar();
- }
Advertisement
Add Comment
Please, Sign In to add comment