I wanna make a captcha like check but all it does is crash. What's wrong with the code? My code looks like this:
printf("I need to make some tests to ensure that you are a human being.\n");
printf("Let's start\n");
int randomNumber1 = rand() % 100;
int randomNumber2 = rand() % 100;
printf("What is %d + %d ?\n", randomNumber1, randomNumber2);
int randomNumberSum = randomNumber1 + randomNumber2;
int solution;
printf("%d \n", randomNumberSum);
scanf("%d", solution);
if (solution = randomNumberSum) {
printf("Good job human !\n");
} else {
printf("Nice try, bot \n");
}
Aucun commentaire:
Enregistrer un commentaire