#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
void generate(char computer[])
{
int i = 0, j, t;
srand(time(NULL));
while (i < 4) {
t = rand() % 10 + '0';
for (j = 0; j < i; ++j)
if (t == computer[j])
break;
if (j == i) {
computer[i] = t;
++i;
}
}
}
int is_valid(char man[])
{
int i, j;
if (!(isdigit(man[0])
&& isdigit(man[1])
&& isdigit(man[2])
&& isdigit(man[3])
&& man[4] == '