>16)) { \$max = \$probe; \$probe = (\$probe << 16) + 0xffff; } return \$max; } if (!defined('PHP_INT_MAX')) { define ('PHP_INT_MAX', get_int_max()); } \$max = array(); \$max[0] = 2; \$max[1] = 10; \$max[2] = 100; \$max[3] = 1000; \$max[4] = 10000; \$max[5] = 100000; \$max[6] = 1000000; \$max[7] = 10000000; \$max[8] = 100000000; \$max[9] = 1000000000; \$max[10] = PHP_INT_MAX; if (\$max[10] > 10000000000) \$max[10] = 10000000000; function generate() { global \$max; \$_SESSION['count']++; \$num = rand(\$max[\$_SESSION['count']-1], \$max[\$_SESSION['count']]-1); if (\$_SESSION['count'] == 1) \$ans = prime(\$num); else { if (\$num % 2 == 0) \$num++; \$ans = rand(0,999) < 500; while (prime(\$num) != \$ans || \$num % 5 == 0) \$num += 2; } \$_SESSION['number'] = \$num; if (\$ans) \$_SESSION['answer'] = "yes"; else \$_SESSION['answer'] = "no"; } ?> Primality test!

# Primality test!

Question : Is a prime number?

id="f" name="f" method="post"> CORRECT\n"); else { printf("\n"); \$_SESSION['count']--; \$_SESSION['wrong']++; } if (\$_SESSION['count'] < \$limit) { \$_SESSION['generate'] = true; printf("\n"); printf("\n"); } else \$_SESSION['reset'] = true; } else { printf("\n"); if (\$cheat) { printf("\n"); printf("\n", \$_SESSION['answer']); } } ?>
 Yes No WRONG if I were you, I'd say %s