$questions =
array(
array(array("What is the derivative of
x^2?","2x","(1/3)x^3","x^2","x"),
array("What is the derivative of
x?","1","(1/3)x^3","x^2","x"))
,
array(array("What is the derivative of
e^x?","e^x","-sin(x)","cos(x)","x^e"))
,array(array("What is the derivative of
sin(x)?","cos(x)","e^x","-sin(x)","x^e"),
array("What is the derivative of
cos(x)?","-sin(x)","e^x","cos(x)","x^e"))
,
array(array("What is the derivative of
f*g?","f(x)*g'(x)+g(x)*f'(x)","(g(x)*f'(x)-f(x)*g'(x))/(g(x))^2","f'(g(x))*g'(x)","f'(x)*g'(x)+f(x)*g(x)"),
array("What is the derivative of
f/g?","(g(x)*f'(x)-f(x)*g'(x))/(g(x))^2","f'(g(x))*g'(x)","f(x)*g'(x)+g(x)*f'(x)","f'(x)*g'(x)+f(x)*g(x)"))
,
array(array("What is the derivative of
f(g(x))?","f'(g(x))*g'(x)","f(x)*g'(x)+g(x)*f'(x)","f'(x)*g'(x)+f(x)*g(x)","(g(x)*f'(x)-f(x)*g'(x))/(g(x))^2"))
,
array(array("What is the derivative of
a^x?","a^x*ln(a)","1/x","1/(1+x^2)","sec(x)^2"),
array("What is the derivative of
ln(x)?","1/x","a^x*ln(a)","1/(1+x^2)","sec(x)^2"),
array("What is the derivative of
arctan(x)?","1/(1+x^2)","a^x*ln(a)","1/x","sec(x)^2"))
,//ab
array(array("If 3x^2+3xy+y^2=1, then dy/dx=","-(3x+y)/(x+y)","-(3x+y)/y^2","(1-3x-y)/(x+y)","-3x/(x+y)"),
array("The slope of the tangent to the curve y^3*x + y^2*x^2 = 6 at (2,1) is","-5/14","-3/2","-1","-3/14"))
,
array(array("How many points of inflection does y=x^4-2x^3 have?","2","0","1","3"))
,
array(array("If f(x) = sin^2(3-x), then f'(x)=","-2sin(3)cos(3)","-2cos(3)","6cos(3)","2sin(3)cos(3)"))
,
array(array("If the function f given by f(x)=x^3 has an average value of 9 on the closed interval [0,k] then k=?","36^(1/3)","36^(1/4)","18^(1/3)","3"))
,
array(array("What is the average rate of change of the function f given by f(x) = x^4 - 5x on the closed interval [0,3]?","22","8.5","33","66"))
,
array(array("What is the limit as x approaches infinity of (x^2-4)/(2+x-4x^2)?","-1/4","-2","1/2","The limit does not exist."))
,
array(array("What is the average rate of change of the function f given by f(x) = x^4 - 5x on the closed interval [0,3]?","22","8.5","33","66"))
,
array(array("The integral of (x-1)sqrt(x)dx is","(2/5)x^(5/2)-(2/3)x^(3/2)+C","(1/2)x^2-x+C","(3/2)sqrt(x)-1/sqrt(x)+C","x^2-x+C"))
,
array(array("The position of a particle moving along a line is given by s(t) = 2t^3-24t^2+90t+7 for t>=0. For what values of t is the speed of the particle increasing?","3 < t < 4 and t > 5","3 < t < 4 only","t > 4 only","t > 5 only"))
);
extract($_REQUEST);
if (0){
$ll1 = 1;
$ll2 = 1;
$ll3 = 1;
}
if (isset($level)){
if ($answer == $options){
$level++;
} else {
$m = 0;
if ($level>=5){
$m = 1000;
}
if ($level>=10){
$m = 32000;
}
$level = 0;
echo "Wrong answer!
The correct answer was $answertext.
You walk away with
\$$m.
";
echo "
Try again?";
exit;
}
} else {
$level = 0;
$ll1 = 1;
$ll2 = 1;
$ll3 = 1;
}
$money = array(100,200,300,500,1000,2000,4000,8000,16000,32000,64000,125000,250000,500000,1000000);
if ($level>14){die("