#include #include int main () { int bg[1000]; int i; int findthis; int found = 0; for (i = 0; i< 1000; i++) bg[i] = (int) random(); printf("Enter a potential bad guy id >"); scanf("%d", &findthis); for (i = 0; i < 1000; i++) printf("\n bad guy %d is %d", i, bg[i]); for (i = 0; i < 1000; i++) if (findthis == bg[i]) { printf("Found the bad guy at position %d\n", i); found = 1; break; } if (0 == found) printf ("Bad guy not in the list\n"); return 0; }