n=$counter
questiontype=0
image=0
math=0

checkfile=exos/checkfile1.proc
question$n=!record 1 of lang/remarks.$taal
nulpunten=!record 2 of lang/remarks.$taal
#@ er zijn dus geen nulpunten,er is nu slechts &eacute;&eacute;n nulpunt,dus twee nulpunten
nul=!item 1 of $nulpunten
een=!item 2 of $nulpunten
twee=!item 3 of $nulpunten
!if $level=0
    R=$counter
!else
    R=$level
!endif

a=!randitem 2,3,4,5,6,7,8,9,10
b=!randitem 0,1,2,3,4,5,6,7,8,9,10    
c=!randitem 0,1,2,3,4,5,6,7,8,9,10
a1=!randitem -1,1
b1=!randitem -1,1
c1=!randitem -1,1
a=$[$a1*$a]
b=$[$b1*$b]
c=$[$c1*$c]
sommen=$empty
!if $R = 1 
    functie=($a)*x^2 + ($c)
    D=-4*$a*$c
    DD= \begin{bf}D\,\,=\,\,\end{bf} -4\cdot $a \cdot $c
!endif
!if $R = 2
    functie=($a)*x^2 + ($b)*x
    D=$b*$b 
    DD= \begin{bf}D\,\,=\,\,\end{bf} ($b)^{2} - 4\cdot $a \cdot 0
!endif
!if $R >2
    functie=($a)*x^2 + ($b)*x + $c
    D=$b*$b - 4*$a*$c
    DD= \begin{bf}D\,\,=\,\,\end{bf} ($b)^{2} - 4\cdot $a \cdot $c
!endif
!if $[$D] > 0
    !if $a>0
	thumbnail=dal2.gif
    !else
	thumbnail=berg2.gif
    !endif
    answer$n=2
    tt=$twee
!else
    !if $[$D] < 0
	!if $a>0
	    thumbnail=dal0.gif
	!else
	    thumbnail=berg0.gif	
	!endif
	answer$n=0
	tt=$nul
    !else
	!if $a>0
	    thumbnail=dal1.gif
	!else
	    thumbnail=berg1.gif
	!endif
	answer$n=1
	tt=$een
    !endif
!endif        		    

textanswer$n=<table cellpadding="10"><td>$tt</td><tr><td><img name="insert$n" src="$module_dir/gifs/$thumbnail" alt="$thumnail"></td></table>
texanswer$n= $DD = $[$D] 
formula$n=!exec pari printtex($functie)
keuze=!randitem 1,2
!if $keuze=1
    F=!randitem f,g,h,k,p,w
    formula$n=$F\left( x \right)\,\,\,=\,\,\, $(formula$n)
!else
    formula$n=y\,\,\,=\,\,\, $(formula$n)	
!endif
