!set n=$teller
!if $graad=0
    R=$teller
!else
    R=$graad
!endif        
plaatje=0
varlist=$empty
arglist=$empty
varcnt=0
woordmax=40

bewerking=nivo/bewerking1.proc
!if $R=1
    somtekst$n=!record 2 of lang/remarks.$taal
    getal1=!shuffle -5,-4,-3,-2,-1,1,2,3,4,5,6,7,8
    getal2=!shuffle 2,3,4,5,6,7,8,9,10
    a=!item 1 of $getal1
    b=!item 2 of $getal1
    c=!item 1 of $getal2
    d=!item 2 of $getal2
    pm=!randitem +,-
    !if $[$b $pm $d]=0
	d=$[$d+1]
    !endif	
    !if $[$c - 1*($pm $d)]=0
	d=$[$d+1]
    !endif
    opgave$n=!texmath $a + $c*i - ($b $pm $d*i)
    GOED$n=!rawmath $[($a-$b)] + $[$c - 1*($pm $d)]*i 
    goed$n=!texmath $(GOED$n)
 !exit
!endif


!if $R=2
    somtekst$n=!record 2 of lang/remarks.$taal
    a=!randitem -5,-4,-3,-2,-1,1,2,3,4,5,6,7,8
    b=!randitem 1,2,3,4,5,6,7,8
    c=!randitem 2,3,4,5,6,7,8,9
    d=!randitem 2,3,4,5,6,7,8,9
    !if $[$a*$b-$c]=0
	c=$[$c+1]
    !endif
    !if $[$b+$a*$c]=0
	c=$[$c+1] 
    !endif
    	
    opgave$n=!texmath ($a + i)*($b + $c*i)
    GOED$n=!rawmath $[$a*$b - $c] + $[($b+$a*$c)]*i 
    goed$n=!texmath $(GOED$n)
 !exit
!endif

!if $R=3
    somtekst$n=!record 2 of lang/remarks.$taal
    a=!randitem -5,-4,-3,-2,-1,1,2,3,4,5,6,7,8
    b=!randitem 1,2,3,4,5,6,7,8
    c=!randitem 2,3,4,5,6,7,8,9
    d=!randitem 2,3,4,5,6,7,8,9
    !if $c=$b
	b=$[$c+1]
    !endif
    opgave$n=!texmath $a+$d*i*($b - $c*i)^2
    GOED$n=!rawmath $[$a+2*$b*$c*$d] + $[$d*$b*$b -$d*$c*$c]*i
    goed$n=!texmath $(GOED$n)
 !exit
!endif

!if $R>3
    somtekst$n=!record 2 of lang/remarks.$taal
    a=!randitem -5,-4,-3,-2,-1,1,2,3,4,5,6,7,8
    b=!randitem 1,2,3,4,5,6,7,8
    c=!randitem 2,3,4,5,6,7,8,9
    d=!randitem 2,3,4,5,6,7,8,9
    !if $[$b*$c]=$[$a*$d]
	b=$[$b+1]
    !endif
    !if $[$b*$c]=$[-1*$a*$d]
	b=$[$b+1]
    !endif
    
    opgave$n=!texmath ($a+$b*i)/($c + $d*i) 
    tussen=!exec pari b1=($a*$c+$b*$d)/($c*$c + $d*$d)\
    b2=($b*$c - $a*$d)/($c*$c + $d*$d)
    
    B1=!line 1 of $tussen
    B2=!line 2 of $tussen
    GOED$n=!rawmath $B1 + $B2*i 
    goed$n=!texmath $(GOED$n)
 !exit
!endif


