!set n=$teller
bewerking=bewerking4.proc
aantal_vragen=1

!if $taal=nl
    nivo_title=Ingewikkelde Machten
    somtekst$n=Schrijf als &eacute;&eacute;n macht.<br><small>kijk even in de help-pagina van deze som voor uitleg</p>
    hint=Kijk in de Help-pagina !!
!else
    nivo_title=Complicated powers
    somtekst$n=Rewrite as a single power<br><small>Look into the help-pages</small></p>
    hint=Look into the help-pages
!endif

!if $graad=0
    R=$teller
!else
    R=$graad
!endif        

!if $R=1 
    d=!randitem 2,3,4,5,6,7,8,9,10
    B=!randitem 2,3,4,5,6,7,8,9,10	
    A=$[$d*$B]
    !if $negatief=0
	a=!randitem 2,3,4,5,6,7,8,9,10
	c=!randitem 2,3,4,5,6,7,8,9,10
    !else
	a=!randitem -1,-2,-3,-4,-5,-6,-7,-8,-9,-10,2,3,4,5,6,7,8,9,10
	c=!randitem 2,3,4,5,6,7,8,9,10,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10    
    !endif	
    opgave$n=\left(\frac{$A^{$a}}{$B^{$a}}\right)^{$c}
    GOED$n=$d^$[$a*$c]
    antwoord$n=\left(\frac{$A^{$a}}{$B^{$a}}\right)^{$c}= \left(\left(\frac{$A}{$B}\right)^{$a}\right)^{$c}= \left(\frac{$A}{$B}\right)^{$a \cdot $c} = $d^{$a \cdot $c} = $d^{$[$a*$c]}
  !exit
!endif

!if $R=2
    B=!randitem 2,3,4,5,6,7,8,9,10	
    A=$[$B*$B]
    !if $negatief=0
	b=!randitem 3,4,5,6,7,8
	a=$[2+$b]
	c=!randitem 2,3,4,5,6,7,8,9
    !else
	b=!randitem 2,3,4,5,6,-1,-2,-3,-4,-5,-6,-7,-8
	a=$[2+$b]
	c=!randitem 2,3,4,5,6,7,8,9,-2,-3,-4,-5,-6,-7,-8,-9
    !endif	
    opgave$n=\left(\frac{$A^{$a}}{$B^{$b}}\right)^{$c}
    GOED$n=$B^$[$c*(2*$a-$b)]
    !if $[$c*(2*$a-$b)] = 0 
	heelmooi= \,\,=\,\,1
    !else
	heelmooi=$empty
    !endif
    antwoord$n=\left(\frac{$A^{$a}}{$B^{$b}}\right)^{$c}=\left(\frac{ \left($B^{2} \right)^{$a}}{$B^{$b}}\right)^{$c}=\left(\frac{$B^{2\cdot $a}}{$B^{$b}}\right)^{$c}=\left(\frac{$B^{$[2*$a]}}{$B^{$b}}\right)^{$c}=\left($B^{$[2*$a] - $b}\right)^{$c}=\left($B^{$[2*$a - $b]}\right)^{$c}=$B^{$c \cdot $[2*$a - $b]}=$B^{$[$c*(2*$a - $b)]} $heelmooi	
  !exit
!endif

!if $R >2
    d=!randitem 2,3,4,5
    B=!randitem 2,3,4,5	
    A=$[$B^$d]
    !if $negatief=0
	b=!randitem 2,3,4,5,6,7,8,9
	a=$[$d+$b]
	c=!randitem 2,3,4,5,6,7,8,9
    !else
	b=!randitem 2,3,4,5,6,7,8,9,-2,-3,-4,-5,-6,-7,-8,-9,-10
	a=$[$d+$b]
	c=!randitem 2,3,4,5,6,7,8,9,-2,-3,-4,-5,-6,-7,-8,-9,-10
    !endif
    opgave$n=\left(\frac{$A^{$a}}{$B^{$b}}\right)^{$c}
    GOED$n=$B^$[$c*($d*$a - $b)]
    !if $[$c*($d*$a - $b)] = 0
	heelmooi= \,\,=\,\,1
    !else
	heelmooi=$empty
    !endif
    antwoord$n=\left(\frac{$A^{$a}}{$B^{$b}}\right)^{$c}=\left(\frac{ \left($B^{$d} \right)^{$a}}{$B^{$b}}\right)^{$c}=\left(\frac{$B^{$d\cdot $a}}{$B^{$b}}\right)^{$c}=\left(\frac{$B^{$[$d*$a]}}{$B^{$b}}\right)^{$c}=\left($B^{$[$d*$a] - $b}\right)^{$c}=\left($B^{$[$d*$a - $b]}\right)^{$c}=$B^{$c \cdot $[$d*$a - $b]}=$B^{$[$c*($d*$a - $b)]} $heelmooi	
  !exit
!endif



